python311Packages.uarray: test with pytest7

and refactor to use PEP517 builder and lingo.
This commit is contained in:
Martin Weinelt 2024-03-24 23:48:07 +01:00
parent aa83e77739
commit 3bf5b41d22
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
1 changed files with 24 additions and 5 deletions

View File

@ -2,18 +2,19 @@
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, setuptools
, matchpy
, numpy
, astunparse
, typing-extensions
, pytestCheckHook
, pytest7CheckHook
, pytest-cov
}:
buildPythonPackage rec {
pname = "uarray";
version = "0.8.2";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "Quansight-Labs";
@ -31,14 +32,32 @@ buildPythonPackage rec {
}
)];
nativeCheckInputs = [ pytestCheckHook pytest-cov ];
propagatedBuildInputs = [ matchpy numpy astunparse typing-extensions ];
build-system = [
setuptools
];
dependencies = [
astunparse
matchpy
numpy
typing-extensions
];
nativeCheckInputs = [
pytest7CheckHook
pytest-cov
];
# Tests must be run from outside the source directory
preCheck = ''
cd $TMP
'';
pytestFlagsArray = ["--pyargs" "uarray" "-W" "ignore::pytest.PytestRemovedIn8Warning" ];
pytestFlagsArray = [
"--pyargs"
"uarray"
];
pythonImportsCheck = [ "uarray" ];
meta = with lib; {