1{ lib, buildPythonPackage, fetchPypi, pythonOlder
2, attrs
3, sortedcontainers
4, async_generator
5, idna
6, outcome
7, contextvars
8, pytest
9, pyopenssl
10, trustme
11}:
12
13buildPythonPackage rec {
14 pname = "trio";
15 version = "0.6.0";
16 disabled = pythonOlder "3.5";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "7a80c10b89068950aa649edd4b09a6f56236642c2c2e648b956289d2301fdb9e";
21 };
22
23 checkInputs = [ pytest pyopenssl trustme ];
24 # It appears that the build sandbox doesn't include /etc/services, and these tests try to use it.
25 checkPhase = ''
26 py.test -k 'not test_getnameinfo and not test_SocketType_resolve and not test_getprotobyname'
27 '';
28 propagatedBuildInputs = [
29 attrs
30 sortedcontainers
31 async_generator
32 idna
33 outcome
34 ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ];
35
36 meta = {
37 description = "An async/await-native I/O library for humans and snake people";
38 homepage = https://github.com/python-trio/trio;
39 license = with lib.licenses; [ mit asl20 ];
40 maintainers = with lib.maintainers; [ catern ];
41 };
42}