1{ lib, buildPythonPackage, fetchPypi, pythonOlder
2, attrs
3, sortedcontainers
4, async_generator
5, idna
6, outcome
7, contextvars
8, pytestCheckHook
9, pyopenssl
10, trustme
11, sniffio
12, stdenv
13, jedi
14, pylint
15, astor
16, yapf
17}:
18
19buildPythonPackage rec {
20 pname = "trio";
21 version = "0.16.0";
22 disabled = pythonOlder "3.5";
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "df067dd0560c321af39d412cd81fc3a7d13f55af9150527daab980683e9fcf3c";
27 };
28
29 checkInputs = [ astor pytestCheckHook pyopenssl trustme jedi pylint yapf ];
30 # It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
31 disabledTests = [
32 "getnameinfo"
33 "SocketType_resolve"
34 "getprotobyname"
35 "waitpid"
36 "static_tool_sees_all_symbols"
37 ];
38
39 propagatedBuildInputs = [
40 attrs
41 sortedcontainers
42 async_generator
43 idna
44 outcome
45 sniffio
46 ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
47
48 # tests are failing on Darwin
49 doCheck = !stdenv.isDarwin;
50
51 meta = {
52 description = "An async/await-native I/O library for humans and snake people";
53 homepage = "https://github.com/python-trio/trio";
54 license = with lib.licenses; [ mit asl20 ];
55 maintainers = with lib.maintainers; [ catern ];
56 };
57}