0d9fc34957
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, callPackage
|
|
, fetchFromGitHub
|
|
, flaky
|
|
, hypothesis
|
|
, pytest
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools-scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-asyncio";
|
|
version = "0.20.3";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pytest-dev";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-oq28wJ/Tq4yuQ/98tdzYKDyatpliS0Xcbc6T46ZTP7I=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"testout"
|
|
];
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
buildInputs = [
|
|
pytest
|
|
];
|
|
|
|
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/v${version}/CHANGELOG.rst";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|