nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 59 lines 1.3 kB view raw
1{ 2 lib, 3 anyio, 4 buildPythonPackage, 5 curio-compat, 6 fetchFromGitHub, 7 hatchling, 8 hypothesis, 9 pytest, 10 pytestCheckHook, 11 pythonOlder, 12 trio-asyncio, 13 trio, 14 uvloop, 15}: 16 17buildPythonPackage (finalAttrs: { 18 pname = "pytest-aio"; 19 version = "2.1.7"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "klen"; 24 repo = "pytest-aio"; 25 tag = finalAttrs.version; 26 hash = "sha256-HvD7bBT8QX9Au5TON4yLit2AOLVSRGqdkkwenyqzhpo="; 27 }; 28 29 build-system = [ hatchling ]; 30 31 buildInputs = [ pytest ]; 32 33 optional-dependencies = { 34 curio = [ curio-compat ]; 35 trio = [ trio ]; 36 uvloop = [ uvloop ]; 37 }; 38 39 nativeCheckInputs = [ 40 anyio 41 hypothesis 42 pytestCheckHook 43 ] 44 # https://github.com/python-trio/trio-asyncio/issues/160 45 ++ lib.optionals (pythonOlder "3.14") [ 46 trio-asyncio 47 ] 48 ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); 49 50 pythonImportsCheck = [ "pytest_aio" ]; 51 52 meta = { 53 description = "Pytest plugin for aiohttp support"; 54 homepage = "https://github.com/klen/pytest-aio"; 55 changelog = "https://github.com/klen/pytest-aio/blob/${finalAttrs.src.tag}/CHANGELOG.md"; 56 license = lib.licenses.mit; 57 maintainers = with lib.maintainers; [ fab ]; 58 }; 59})