1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6
7 # build-system
8 cython,
9 oldest-supported-numpy,
10 setuptools,
11
12 # dependencies
13 numpy,
14
15 # checks
16 colormath,
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "color-operations";
22 version = "0.1.4";
23 pyproject = true;
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "vincentsarago";
28 repo = "color-operations";
29 rev = "refs/tags/${version}";
30 hash = "sha256-qqOTmVYD3VfjeVJtYvDQw+cxjcTsmqTYQNL1qMX+fL4=";
31 };
32
33 build-system = [
34 cython
35 oldest-supported-numpy
36 setuptools
37 ];
38
39 dependencies = [ numpy ];
40
41 nativeCheckInputs = [
42 colormath
43 pytestCheckHook
44 ];
45
46 preCheck = ''
47 python setup.py build_ext --inplace
48 '';
49
50 pythonImportsCheck = [ "color_operations" ];
51
52 meta = {
53 description = "Apply basic color-oriented image operations. Fork of rio-color";
54 homepage = "https://github.com/vincentsarago/color-operations";
55 license = lib.licenses.mit;
56 maintainers = lib.teams.geospatial.members;
57 };
58}