1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numba
5, numpy
6, pillow
7, scipy
8, pytestCheckHook
9,
10}:
11buildPythonPackage rec {
12 pname = "pymatting";
13 version = "1.1.2";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "pymatting";
18 repo = "pymatting";
19 rev = "v${version}";
20 hash = "sha256-9eRpsWwXAkp6aw1ZWJsUFf0BMIN0UBFc2rW1lltL2cw=";
21 };
22
23 patches = [ ./01-kdtree-signature.patch ];
24
25 propagatedBuildInputs = [
26 numba
27 numpy
28 pillow
29 scipy
30 ];
31
32 pythonImportsCheck = [ "pymatting" ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # no access to input data set
40 # see: https://github.com/pymatting/pymatting/blob/master/tests/download_images.py
41 "test_alpha"
42 "test_laplacians"
43 "test_preconditioners"
44 "test_lkm"
45 ];
46
47 meta = with lib; {
48 description = "A Python library for alpha matting";
49 homepage = "https://github.com/pymatting/pymatting";
50 changelog = "https://github.com/pymatting/pymatting/blob/${src.rev}/CHANGELOG.md";
51 license = licenses.mit;
52 maintainers = with maintainers; [ blaggacao ];
53 };
54}
55