From e5cd0b86b1ff8ddb45eb4438f310c6c2624ab560 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 2 May 2022 10:08:41 +0000 Subject: [PATCH 1/3] python310Packages.pims: 0.5 -> 0.6.0 --- pkgs/development/python-modules/pims/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pims/default.nix b/pkgs/development/python-modules/pims/default.nix index 2f9fbdccd550..d331bf372bbc 100644 --- a/pkgs/development/python-modules/pims/default.nix +++ b/pkgs/development/python-modules/pims/default.nix @@ -10,12 +10,12 @@ }: buildPythonPackage rec { - version = "0.5"; + version = "0.6.0"; pname = "PIMS"; src = fetchPypi { inherit pname version; - sha256 = "a02cdcbb153e2792042fb0bae7df4f30878bbba1f2d176114a87ee0dc18715a0"; + sha256 = "sha256-EQJ0LWQsi4rMcQ011QK11whe4SiMNhg3PvjEcgMLxoM="; }; checkInputs = [ nose ]; From 2e24a02d0f05a92e3611f396329f9d2359a62a68 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 2 May 2022 21:17:06 +0200 Subject: [PATCH 2/3] python310Packages.pims: enable tests - fix license - update inputs --- .../python-modules/pims/default.nix | 54 ++++++++++++------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/pims/default.nix b/pkgs/development/python-modules/pims/default.nix index d331bf372bbc..d11cebd4e785 100644 --- a/pkgs/development/python-modules/pims/default.nix +++ b/pkgs/development/python-modules/pims/default.nix @@ -1,34 +1,52 @@ { lib , buildPythonPackage -, fetchPypi -, slicerator -, scikitimage -, six +, fetchFromGitHub +, imageio , numpy -, tifffile -, nose +, pytestCheckHook +, pythonOlder +, scikitimage +, slicerator }: buildPythonPackage rec { + pname = "pims"; version = "0.6.0"; - pname = "PIMS"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-EQJ0LWQsi4rMcQ011QK11whe4SiMNhg3PvjEcgMLxoM="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "soft-matter"; + repo = pname; + rev = "v${version}"; + hash = "sha256-F4UWbD9fOfvaZwYcY1l7XOzVKZyqqTGTqVJoNPo1Ozg="; }; - checkInputs = [ nose ]; - propagatedBuildInputs = [ slicerator six numpy tifffile scikitimage ]; + propagatedBuildInputs = [ + slicerator + imageio + numpy + ]; - # not everything packaged with pypi release - doCheck = false; - pythonImportsCheck = [ "pims" ]; + checkInputs = [ + pytestCheckHook + scikitimage + ]; + + pythonImportsCheck = [ + "pims" + ]; + + disabledTests = [ + # NotImplementedError: Do not know how to deal with infinite readers + "TestVideo_ImageIO" + ]; meta = with lib; { - homepage = "https://github.com/soft-matter/pims"; description = "Python Image Sequence: Load video and sequential images in many formats with a simple, consistent interface"; - license = licenses.bsdOriginal; - maintainers = [ maintainers.costrouc ]; + homepage = "https://github.com/soft-matter/pims"; + license = licenses.bsd3; + maintainers = with maintainers; [ costrouc ]; }; } From 2a0b704f16f1984e65c661345f267e72014a1d33 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 2 May 2022 21:57:08 +0200 Subject: [PATCH 3/3] python310Packages.pims: ignore DeprecationWarning --- pkgs/development/python-modules/pims/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/pims/default.nix b/pkgs/development/python-modules/pims/default.nix index d11cebd4e785..85a867ec5118 100644 --- a/pkgs/development/python-modules/pims/default.nix +++ b/pkgs/development/python-modules/pims/default.nix @@ -38,6 +38,11 @@ buildPythonPackage rec { "pims" ]; + pytestFlagsArray = [ + "-W" + "ignore::DeprecationWarning" + ]; + disabledTests = [ # NotImplementedError: Do not know how to deal with infinite readers "TestVideo_ImageIO"