2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numba
|
|
|
|
, numpy
|
|
|
|
, pillow
|
|
|
|
, pytestCheckHook
|
2024-02-07 01:22:34 +00:00
|
|
|
, scipy
|
|
|
|
, setuptools
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymatting";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.1.10";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pymatting";
|
|
|
|
repo = "pymatting";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-wHCTqcBvVN/pTXH3iW57DPpMEsnehutRQB5NaugS6Zs=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numba
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pymatting"
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
# no access to input data set
|
|
|
|
# see: https://github.com/pymatting/pymatting/blob/master/tests/download_images.py
|
|
|
|
"test_alpha"
|
|
|
|
"test_laplacians"
|
|
|
|
"test_preconditioners"
|
|
|
|
"test_lkm"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python library for alpha matting";
|
|
|
|
homepage = "https://github.com/pymatting/pymatting";
|
|
|
|
changelog = "https://github.com/pymatting/pymatting/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|