Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.colormath: refactor #313342

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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