Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 62 lines 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, trio 5, outcome 6, sniffio 7, pytest-trio 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "trio-asyncio"; 14 version = "0.12.0"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 pname = "trio_asyncio"; 21 inherit version; 22 sha256 = "824be23b0c678c0df942816cdb57b92a8b94f264fffa89f04626b0ba2d009768"; 23 }; 24 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "'pytest-runner'" "" 28 ''; 29 30 propagatedBuildInputs = [ 31 trio 32 outcome 33 sniffio 34 ]; 35 36 nativeCheckInputs = [ 37 pytest-trio 38 pytestCheckHook 39 ]; 40 41 pytestFlagsArray = [ 42 # https://github.com/python-trio/trio-asyncio/issues/112 43 "-W" "ignore::DeprecationWarning" 44 # trio.MultiError is deprecated since Trio 0.22.0; use BaseExceptionGroup (on Python 3.11 and later) or exceptiongroup.BaseExceptionGroup (earlier versions) instead (https://github.com/python-trio/trio/issues/2211) 45 "-W" "ignore::trio.TrioDeprecationWarning" 46 ]; 47 48 disabledTestPaths = [ 49 "tests/python" # tries to import internal API test.test_asyncio 50 ]; 51 52 pythonImportsCheck = [ 53 "trio_asyncio" 54 ]; 55 56 meta = with lib; { 57 description = "Re-implementation of the asyncio mainloop on top of Trio"; 58 homepage = "https://github.com/python-trio/trio-asyncio"; 59 license = with licenses; [ asl20 /* or */ mit ]; 60 maintainers = with maintainers; [ dotlambda ]; 61 }; 62}