2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2021-12-30 13:39:12 +00:00
|
|
|
, trio
|
|
|
|
, outcome
|
|
|
|
, sniffio
|
2024-01-13 08:15:51 +00:00
|
|
|
, exceptiongroup
|
2021-12-30 13:39:12 +00:00
|
|
|
, pytest-trio
|
|
|
|
, pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonAtLeast
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "trio-asyncio";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.13.0";
|
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "trio_asyncio";
|
|
|
|
inherit version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-fKJLIaGxes3mV1LWkziGuiQoTlL0srDe/k6o7YpjSmI=";
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
trio
|
|
|
|
outcome
|
|
|
|
sniffio
|
2024-01-13 08:15:51 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
exceptiongroup
|
2021-12-30 13:39:12 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-30 13:39:12 +00:00
|
|
|
pytest-trio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/python-trio/trio-asyncio/blob/v${version}/docs/source/history.rst";
|
2021-12-30 13:39:12 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|