Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / anyio / default.nix
blobe6cc3182487a3ea214a64ef4d20c0e03b84f3b4f
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
6 , idna
7 , sniffio
8 , typing-extensions
9 , curio
10 , hypothesis
11 , pytestCheckHook
12 , trio
13 , trustme
14 , uvloop
17 buildPythonPackage rec {
18   pname = "anyio";
19   version = "2.2.0";
20   format = "pyproject";
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "agronholm";
25     repo = pname;
26     rev = version;
27     sha256 = "0ram1niv2lg9qj53zssph104a4kxl8f94ilfn6mibn034m3ikcc8";
28   };
30   propagatedBuildInputs = [
31     idna
32     sniffio
33   ] ++ lib.optionals (pythonOlder "3.8") [
34     typing-extensions
35   ];
37   checkInputs = [
38     curio
39     hypothesis
40     pytestCheckHook
41     trio
42     trustme
43     uvloop
44   ];
46   pytestFlagsArray = [
47     # lots of DNS lookups
48     "--ignore=tests/test_sockets.py"
49   ] ++ lib.optionals stdenv.isDarwin [
50     # darwin sandboxing limitations
51     "--ignore=tests/streams/test_tls.py"
52   ];
54   pythonImportsCheck = [ "anyio" ];
56   meta = with lib; {
57     description = "High level compatibility layer for multiple asynchronous event loop implementations on Python";
58     homepage = "https://github.com/agronholm/anyio";
59     license = licenses.mit;
60     maintainers = with maintainers; [ hexa ];
61   };