From 3bf5b41d2288acea755a8c758da4611e57d065a1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 24 Mar 2024 23:48:07 +0100 Subject: [PATCH] python311Packages.uarray: test with pytest7 and refactor to use PEP517 builder and lingo. --- .../python-modules/uarray/default.nix | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/uarray/default.nix b/pkgs/development/python-modules/uarray/default.nix index 7429ed5750ac..ab22d07049c4 100644 --- a/pkgs/development/python-modules/uarray/default.nix +++ b/pkgs/development/python-modules/uarray/default.nix @@ -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; {