From 3c2ad4bc08b936c327f9d6883e5a6f4405a2bbd3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 2 May 2023 09:35:24 +0200 Subject: [PATCH 1/2] python310Packages.glymur: modernize --- .../python-modules/glymur/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index 31434342be84..d5ce41271c9c 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchFromGitHub , numpy @@ -6,33 +7,34 @@ , openjpeg , procps , pytestCheckHook -, contextlib2 -, mock , importlib-resources -, isPy27 +, pythonOlder , lxml }: buildPythonPackage rec { pname = "glymur"; version = "0.9.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "quintusdias"; repo = pname; - rev = "v${version}"; - sha256 = "1xlpax56qg5qqh0s19xidgvv2483sc684zj7rh6zw1m1z9m37drr"; + rev = "refs/tags/v${version}"; + hash = "sha256-ObczavqhBv4NzEd+ggzTAxGx92uxp6ABxLg8bEpXl/Y="; }; propagatedBuildInputs = [ numpy - ] ++ lib.optionals isPy27 [ contextlib2 mock importlib-resources ]; + ]; nativeCheckInputs = [ - scikitimage + lxml procps pytestCheckHook - lxml + scikitimage ]; postConfigure = '' @@ -47,11 +49,15 @@ buildPythonPackage rec { "tests/test_config.py" ]; + pythonImportsCheck = [ + "glymur" + ]; meta = with lib; { description = "Tools for accessing JPEG2000 files"; homepage = "https://github.com/quintusdias/glymur"; + changelog = "https://github.com/quintusdias/glymur/blob/v${version}/CHANGES.txt"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 4c4ce9b1d4cedbf514f4d20fdf60dffe49bda57d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 2 May 2023 09:42:48 +0200 Subject: [PATCH 2/2] python310Packages.glymur: 0.9.3 -> 0.12.4 Diff: https://github.com/quintusdias/glymur/compare/refs/tags/v0.9.3...v0.12.4 Changelog: https://github.com/quintusdias/glymur/blob/v0.12.4/CHANGES.txt --- .../python-modules/glymur/default.nix | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index d5ce41271c9c..da240ce3f9d5 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -2,20 +2,19 @@ , stdenv , buildPythonPackage , fetchFromGitHub -, numpy -, scikitimage -, openjpeg -, procps -, pytestCheckHook -, importlib-resources -, pythonOlder , lxml +, numpy +, openjpeg +, pytestCheckHook +, pythonOlder +, scikitimage +, setuptools }: buildPythonPackage rec { pname = "glymur"; - version = "0.9.3"; - format = "setuptools"; + version = "0.12.4"; + format = "pyproject"; disabled = pythonOlder "3.6"; @@ -23,16 +22,19 @@ buildPythonPackage rec { owner = "quintusdias"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-ObczavqhBv4NzEd+ggzTAxGx92uxp6ABxLg8bEpXl/Y="; + hash = "sha256-H7aA1nHd8JI3+4dzZhu+GOv/0Y2KRdDkn6Fvc76ny/A="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ numpy ]; nativeCheckInputs = [ lxml - procps pytestCheckHook scikitimage ]; @@ -47,6 +49,7 @@ buildPythonPackage rec { # fsh systems by reading an .rc file and such, and is obviated by the patch # in postConfigure "tests/test_config.py" + "tests/test_tiff2jp2.py" ]; pythonImportsCheck = [