at 23.05-pre 1.5 kB view raw
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, astor 15, yapf 16, coreutils 17}: 18 19buildPythonPackage rec { 20 pname = "trio"; 21 version = "0.21.0"; 22 disabled = pythonOlder "3.6"; 23 24 src = fetchPypi { 25 inherit pname version; 26 sha256 = "sha256-Uj85t7ae73NQHOv+Gq/UAKmq1bA1Q6Dt7VKVJIj/HBM="; 27 }; 28 29 propagatedBuildInputs = [ 30 attrs 31 sortedcontainers 32 async_generator 33 idna 34 outcome 35 sniffio 36 ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ]; 37 38 # tests are failing on Darwin 39 doCheck = !stdenv.isDarwin; 40 41 checkInputs = [ 42 astor 43 jedi 44 pyopenssl 45 pytestCheckHook 46 trustme 47 yapf 48 ]; 49 50 preCheck = '' 51 substituteInPlace trio/tests/test_subprocess.py \ 52 --replace "/bin/sleep" "${coreutils}/bin/sleep" 53 ''; 54 55 # It appears that the build sandbox doesn't include /etc/services, and these tests try to use it. 56 disabledTests = [ 57 "getnameinfo" 58 "SocketType_resolve" 59 "getprotobyname" 60 "waitpid" 61 "static_tool_sees_all_symbols" 62 # tests pytest more than python 63 "fallback_when_no_hook_claims_it" 64 ]; 65 66 pytestFlagsArray = [ 67 "-W" "ignore::DeprecationWarning" 68 ]; 69 70 meta = { 71 description = "An async/await-native I/O library for humans and snake people"; 72 homepage = "https://github.com/python-trio/trio"; 73 license = with lib.licenses; [ mit asl20 ]; 74 maintainers = with lib.maintainers; [ catern ]; 75 }; 76}