mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-15 12:15:56 +01:00
Diff: https://github.com/pytest-dev/pytest-asyncio/compare/v1.1.0...v1.2.0 Changelog: https://github.com/pytest-dev/pytest-asyncio/blob/v1.2.0/docs/reference/changelog.rst
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
callPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
pytest,
|
|
setuptools-scm,
|
|
backports-asyncio-runner,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-asyncio";
|
|
version = "1.2.0"; # N.B.: when updating, tests bleak and aioesphomeapi tests
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pytest-dev";
|
|
repo = "pytest-asyncio";
|
|
tag = "v${version}";
|
|
hash = "sha256-27FCV7zgFGe/Q0fkYyh5Z05foVGhbKBRPTH4UK/tW5A=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"testout"
|
|
];
|
|
|
|
build-system = [ setuptools-scm ];
|
|
|
|
buildInputs = [ pytest ];
|
|
|
|
dependencies = [
|
|
backports-asyncio-runner
|
|
]
|
|
++ lib.optionals (pythonOlder "3.13") [
|
|
typing-extensions
|
|
];
|
|
|
|
postInstall = ''
|
|
mkdir $testout
|
|
cp -R tests $testout/tests
|
|
'';
|
|
|
|
doCheck = false;
|
|
passthru.tests.pytest = callPackage ./tests.nix { };
|
|
|
|
pythonImportsCheck = [ "pytest_asyncio" ];
|
|
|
|
meta = with lib; {
|
|
description = "Library for testing asyncio code with pytest";
|
|
homepage = "https://github.com/pytest-dev/pytest-asyncio";
|
|
changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/${src.tag}/docs/reference/changelog.rst";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|