nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 callPackage, 5 fetchFromGitHub, 6 pythonOlder, 7 pytest, 8 setuptools-scm, 9 backports-asyncio-runner, 10 typing-extensions, 11}: 12 13buildPythonPackage rec { 14 pname = "pytest-asyncio"; 15 version = "1.3.0"; # N.B.: when updating, tests bleak and aioesphomeapi tests 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "pytest-dev"; 20 repo = "pytest-asyncio"; 21 tag = "v${version}"; 22 hash = "sha256-MWKMJkvxdvuOyxE8rNlf15j7C+MwJibnNsbfS0biKwo="; 23 }; 24 25 outputs = [ 26 "out" 27 "testout" 28 ]; 29 30 build-system = [ setuptools-scm ]; 31 32 pythonRelaxDeps = [ "pytest" ]; 33 34 buildInputs = [ pytest ]; 35 36 dependencies = 37 lib.optionals (pythonOlder "3.11") [ 38 backports-asyncio-runner 39 ] 40 ++ lib.optionals (pythonOlder "3.13") [ 41 typing-extensions 42 ]; 43 44 postInstall = '' 45 mkdir $testout 46 cp -R tests $testout/tests 47 ''; 48 49 doCheck = false; 50 passthru.tests.pytest = callPackage ./tests.nix { }; 51 52 pythonImportsCheck = [ "pytest_asyncio" ]; 53 54 meta = { 55 description = "Library for testing asyncio code with pytest"; 56 homepage = "https://github.com/pytest-dev/pytest-asyncio"; 57 changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/${src.tag}/docs/reference/changelog.rst"; 58 license = lib.licenses.asl20; 59 maintainers = with lib.maintainers; [ dotlambda ]; 60 }; 61}