2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numba,
|
|
|
|
numpy,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
|
|
|
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-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numba
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pymatting" ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python library for alpha matting";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/pymatting/pymatting";
|
|
|
|
changelog = "https://github.com/pymatting/pymatting/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
|
|
};
|
|
|
|
}
|