1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 networkx,
6 numpy,
7 pytest8_3CheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "colormath";
14 # Switch to unstable which fixes an deprecation issue with newer numpy
15 # versions, should be included in versions > 3.0
16 # https://github.com/gtaylor/python-colormath/issues/104
17 version = "3.0.0-unstable-2021-04-17";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "gtaylor";
24 repo = "python-colormath";
25 rev = "4a076831fd5136f685aa7143db81eba27b2cd19a";
26 hash = "sha256-eACVPIQFgiGiVmQ/PjUxP/UH/hBOsCywz5PlgpA4dk4=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 networkx
33 numpy
34 ];
35
36 nativeCheckInputs = [ pytest8_3CheckHook ];
37
38 pythonImportsCheck = [ "colormath" ];
39
40 meta = with lib; {
41 description = "Color math and conversion library";
42 homepage = "https://github.com/gtaylor/python-colormath";
43 changelog = "https://github.com/gtaylor/python-colormath/releases/tag/${version}";
44 license = licenses.bsd2;
45 maintainers = with maintainers; [ jonathanreeve ];
46 };
47}