From 7fb25efa8b8d6739a71e52162041f7ea980603bc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 21 May 2024 10:30:34 +0200 Subject: [PATCH 1/2] python312Packages.colormath: refactor - switch to pytestCheckHook - update version - update build-system --- .../python-modules/colormath/default.nix | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/colormath/default.nix b/pkgs/development/python-modules/colormath/default.nix index 42469056b096..b37cd287f66e 100644 --- a/pkgs/development/python-modules/colormath/default.nix +++ b/pkgs/development/python-modules/colormath/default.nix @@ -1,9 +1,11 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub , networkx -, nose , numpy -, lib +, pytestCheckHook +, pythonOlder +, setuptools }: buildPythonPackage rec { @@ -11,8 +13,10 @@ buildPythonPackage rec { # Switch to unstable which fixes an deprecation issue with newer numpy # versions, should be included in versions > 3.0 # https://github.com/gtaylor/python-colormath/issues/104 - version = "unstable-2021-04-17"; - format = "setuptools"; + version = "3.0.0-unstable-2021-04-17"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "gtaylor"; @@ -21,17 +25,27 @@ buildPythonPackage rec { hash = "sha256-eACVPIQFgiGiVmQ/PjUxP/UH/hBOsCywz5PlgpA4dk4="; }; - propagatedBuildInputs = [ networkx numpy ]; + build-system = [ + setuptools + ]; - nativeCheckInputs = [ nose ]; + dependencies = [ + networkx + numpy + ]; - checkPhase = "nosetests"; + nativeCheckInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "colormath" ]; + pythonImportsCheck = [ + "colormath" + ]; meta = with lib; { description = "Color math and conversion library"; homepage = "https://github.com/gtaylor/python-colormath"; + changelog = "https://github.com/gtaylor/python-colormath/releases/tag/${version}"; license = licenses.bsd2; maintainers = with maintainers; [ jonathanreeve ]; }; From fc4e93e2ee612b08448e5d6a6181bc6f31597793 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 21 May 2024 10:31:21 +0200 Subject: [PATCH 2/2] python312Packages.colormath: format with nixfmt --- .../python-modules/colormath/default.nix | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/colormath/default.nix b/pkgs/development/python-modules/colormath/default.nix index b37cd287f66e..d13d9a37efe1 100644 --- a/pkgs/development/python-modules/colormath/default.nix +++ b/pkgs/development/python-modules/colormath/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, networkx -, numpy -, pytestCheckHook -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + networkx, + numpy, + pytestCheckHook, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -25,22 +26,16 @@ buildPythonPackage rec { hash = "sha256-eACVPIQFgiGiVmQ/PjUxP/UH/hBOsCywz5PlgpA4dk4="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ networkx numpy ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ - "colormath" - ]; + pythonImportsCheck = [ "colormath" ]; meta = with lib; { description = "Color math and conversion library";