1{
2 lib,
3 aiodns,
4 buildPythonPackage,
5 c-ares,
6 cffi,
7 fetchPypi,
8 idna,
9 pythonOlder,
10 tornado,
11}:
12
13buildPythonPackage rec {
14 pname = "pycares";
15 version = "4.5.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-AltsL/6k6fuPmglzgcL+yySv8j+9aQbnDaIuybpg4Z0=";
23 };
24
25 buildInputs = [ c-ares ];
26
27 propagatedBuildInputs = [
28 cffi
29 idna
30 ];
31
32 propagatedNativeBuildInputs = [ cffi ];
33
34 # Requires network access
35 doCheck = false;
36
37 passthru.tests = {
38 inherit aiodns tornado;
39 };
40
41 pythonImportsCheck = [ "pycares" ];
42
43 meta = with lib; {
44 description = "Python interface for c-ares";
45 homepage = "https://github.com/saghul/pycares";
46 changelog = "https://github.com/saghul/pycares/releases/tag/pycares-${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ fab ];
49 };
50}