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 checkInputs = [
37 pytest-trio
38 pytestCheckHook
39 ];
40
41 pytestFlagsArray = [
42 # https://github.com/python-trio/trio-asyncio/issues/112
43 "-W"
44 "ignore::DeprecationWarning"
45 ];
46
47 disabledTestPaths = [
48 "tests/python" # tries to import internal API test.test_asyncio
49 ];
50
51 pythonImportsCheck = [
52 "trio_asyncio"
53 ];
54
55 meta = with lib; {
56 description = "Re-implementation of the asyncio mainloop on top of Trio";
57 homepage = "https://github.com/python-trio/trio-asyncio";
58 license = with licenses; [ asl20 /* or */ mit ];
59 maintainers = with maintainers; [ dotlambda ];
60 };
61}