2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, trio
|
|
|
|
, outcome
|
|
|
|
, sniffio
|
|
|
|
, pytest-trio
|
|
|
|
, pytestCheckHook
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trio-asyncio";
|
|
|
|
version = "0.12.0";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "trio_asyncio";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "824be23b0c678c0df942816cdb57b92a8b94f264fffa89f04626b0ba2d009768";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
trio
|
|
|
|
outcome
|
|
|
|
sniffio
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-trio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# https://github.com/python-trio/trio-asyncio/issues/112
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/python" # tries to import internal API test.test_asyncio
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"trio_asyncio"
|
|
|
|
];
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Re-implementation of the asyncio mainloop on top of Trio";
|
|
|
|
homepage = "https://github.com/python-trio/trio-asyncio";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|