2021-12-30 13:39:12 +00:00
{ lib
, buildPythonPackage
, fetchPypi
2024-01-13 08:15:51 +00:00
, setuptools
2024-04-21 15:54:59 +00:00
, greenlet
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
2022-02-20 05:27:41 +00:00
, pythonOlder
2021-12-30 13:39:12 +00:00
} :
buildPythonPackage rec {
pname = " t r i o - a s y n c i o " ;
2024-04-21 15:54:59 +00:00
version = " 0 . 1 4 . 0 " ;
2024-01-13 08:15:51 +00:00
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 = " t r i o _ a s y n c i o " ;
inherit version ;
2024-04-21 15:54:59 +00:00
hash = " s h a 2 5 6 - m s S K Q 8 v h Z x t B I h 7 H N q 4 M 2 q c 0 y K O E r G N i C W L B X X s e 3 W Q = " ;
2021-12-30 13:39:12 +00:00
} ;
postPatch = ''
substituteInPlace setup . py \
2024-04-21 15:54:59 +00:00
- - replace ' " p y t e s t - r u n n e r " ' " "
2021-12-30 13:39:12 +00:00
'' ;
2024-01-13 08:15:51 +00:00
nativeBuildInputs = [
setuptools
] ;
2021-12-30 13:39:12 +00:00
propagatedBuildInputs = [
2024-04-21 15:54:59 +00:00
greenlet
2021-12-30 13:39:12 +00:00
trio
outcome
sniffio
2024-01-13 08:15:51 +00:00
] ++ lib . optionals ( pythonOlder " 3 . 1 1 " ) [
exceptiongroup
2021-12-30 13:39:12 +00:00
] ;
2024-04-21 15:54:59 +00:00
# RuntimeWarning: Can't run the Python asyncio tests because they're not installed. On a Debian/Ubuntu system, you might need to install the libpython3.11-testsuite package.
doCheck = false ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2021-12-30 13:39:12 +00:00
pytest-trio
pytestCheckHook
] ;
disabledTestPaths = [
" t e s t s / p y t h o n " # tries to import internal API test.test_asyncio
] ;
2022-02-20 05:27:41 +00:00
pythonImportsCheck = [
" t r i o _ a s y n c i o "
] ;
2021-12-30 13:39:12 +00:00
meta = with lib ; {
2024-01-13 08:15:51 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / p y t h o n - t r i o / t r i o - a s y n c i o / b l o b / v ${ version } / d o c s / s o u r c e / h i s t o r y . r s t " ;
2021-12-30 13:39:12 +00:00
description = " R e - i m p l e m e n t a t i o n o f t h e a s y n c i o m a i n l o o p o n t o p o f T r i o " ;
homepage = " h t t p s : / / g i t h u b . c o m / p y t h o n - t r i o / t r i o - a s y n c i o " ;
license = with licenses ; [ asl20 /* o r */ mit ] ;
maintainers = with maintainers ; [ dotlambda ] ;
} ;
}