From 9fc48e3b7420527bd4c86b82cc0464d1d2440ff0 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 29 Jul 2024 15:37:31 +0200 Subject: [PATCH] python312packages.paramz: drop nose dependency --- .../python-modules/paramz/default.nix | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/paramz/default.nix b/pkgs/development/python-modules/paramz/default.nix index c2c817a58d714..712cce60a5e62 100644 --- a/pkgs/development/python-modules/paramz/default.nix +++ b/pkgs/development/python-modules/paramz/default.nix @@ -3,17 +3,18 @@ buildPythonPackage, fetchpatch, fetchPypi, + setuptools, numpy, scipy, six, decorator, - nose, + pytestCheckHook, }: buildPythonPackage rec { pname = "paramz"; version = "0.9.5"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; @@ -33,20 +34,38 @@ buildPythonPackage rec { }) ]; + build-system = [ setuptools ]; + propagatedBuildInputs = [ numpy scipy six decorator ]; - nativeCheckInputs = [ nose ]; - pythonImportsCheck = [ "paramz" ]; + nativeCheckInputs = [ pytestCheckHook ]; - checkPhase = '' - nosetests -v paramz/tests + preCheck = '' + substituteInPlace paramz/tests/parameterized_tests.py \ + --replace-fail "assertRaisesRegexp" "assertRaisesRegex" ''; + pytestFlagsArray = [ + "paramz/tests/array_core_tests.py" + "paramz/tests/cacher_tests.py" + "paramz/tests/examples_tests.py" + "paramz/tests/index_operations_tests.py" + "paramz/tests/init_tests.py" + "paramz/tests/lists_and_dicts_tests.py" + "paramz/tests/model_tests.py" + "paramz/tests/observable_tests.py" + "paramz/tests/parameterized_tests.py" + "paramz/tests/pickle_tests.py" + "paramz/tests/verbose_optimize_tests.py" + ]; + + pythonImportsCheck = [ "paramz" ]; + meta = with lib; { description = "Parameterization framework for parameterized model creation and handling"; homepage = "https://github.com/sods/paramz";