Skip to content

Commit

Permalink
Merge pull request #313342 from fabaff/colormath-refactor
Browse files Browse the repository at this point in the history
python312Packages.colormath: refactor
  • Loading branch information
fabaff committed May 21, 2024
2 parents 7a3d8b9 + fc4e93e commit 10ddb3c
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions pkgs/development/python-modules/colormath/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
{ buildPythonPackage
, fetchFromGitHub
, networkx
, nose
, numpy
, lib
{
lib,
buildPythonPackage,
fetchFromGitHub,
networkx,
numpy,
pytestCheckHook,
pythonOlder,
setuptools,
}:

buildPythonPackage rec {
pname = "colormath";
# 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";
Expand All @@ -21,17 +26,21 @@ 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" ];

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 ];
};
Expand Down

0 comments on commit 10ddb3c

Please sign in to comment.