python3Packages.pymatting: init at 1.1.2

This commit is contained in:
David Arnold 2023-07-09 23:48:27 -05:00
parent 06c84f5b48
commit 151fbd059f
No known key found for this signature in database
GPG Key ID: 0318D822BAC965CC
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/tests/test_kdtree.py b/tests/test_kdtree.py
index 0110083..049fa07 100644
--- a/tests/test_kdtree.py
+++ b/tests/test_kdtree.py
@@ -23,7 +23,7 @@ def run_kdtree():
tree = cKDTree(data_points)
- distances2, indices2 = tree.query(query_points, k=k, n_jobs=-1)
+ distances2, indices2 = tree.query(query_points, k=k)
t2 = time.perf_counter()

View File

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numba
, numpy
, pillow
, scipy
, pytestCheckHook
,
}:
buildPythonPackage rec {
pname = "pymatting";
version = "1.1.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "pymatting";
repo = "pymatting";
rev = "v${version}";
hash = "sha256-9eRpsWwXAkp6aw1ZWJsUFf0BMIN0UBFc2rW1lltL2cw=";
};
patches = [ ./01-kdtree-signature.patch ];
propagatedBuildInputs = [
numba
numpy
pillow
scipy
];
pythonImportsCheck = [ "pymatting" ];
nativeCheckInputs = [
pytestCheckHook
];
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 ];
};
}

View File

@ -9047,6 +9047,8 @@ self: super: with self; {
pymatgen = callPackage ../development/python-modules/pymatgen { };
pymatting = callPackage ../development/python-modules/pymatting { };
pymaven-patch = callPackage ../development/python-modules/pymaven-patch { };
pymavlink = callPackage ../development/python-modules/pymavlink { };