From 7c4c61335c4e7ce50e45de2b45a7c41dc553e8dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 1 Sep 2021 18:01:35 +0200 Subject: [PATCH] python3Packages.quantities: fix build --- .../python-modules/quantities/default.nix | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/quantities/default.nix b/pkgs/development/python-modules/quantities/default.nix index 233eb8a44b32..28e08eade43d 100644 --- a/pkgs/development/python-modules/quantities/default.nix +++ b/pkgs/development/python-modules/quantities/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , numpy -, python +, pytestCheckHook }: buildPythonPackage rec { @@ -14,15 +14,27 @@ buildPythonPackage rec { sha256 = "67546963cb2a519b1a4aa43d132ef754360268e5d551b43dd1716903d99812f0"; }; - propagatedBuildInputs = [ numpy ]; + propagatedBuildInputs = [ + numpy + ]; - checkPhase = '' - ${python.interpreter} setup.py test -V 1 - ''; + checkInputs = [ + pytestCheckHook + ]; - meta = { - description = "Quantities is designed to handle arithmetic and"; + disabledTests = [ + # Tests don't work with current numpy + # https://github.com/python-quantities/python-quantities/pull/195 + "test_arctan2" + "test_fix" + ]; + + pythonImportsCheck = [ "quantities" ]; + + meta = with lib; { + description = "Quantities is designed to handle arithmetic and conversions of physical quantities"; homepage = "https://python-quantities.readthedocs.io/"; - license = lib.licenses.bsd2; + license = licenses.bsd2; + maintainers = with maintainers; [ ]; }; }