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