1{
2 lib,
3 buildPythonPackage,
4 cython,
5 fetchPypi,
6 numpy,
7 oldest-supported-numpy,
8 packaging,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools-scm,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "pyemd";
17 version = "1.0.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-tCta57LRWx1N7mOBDqeYo5IX6Kdre0nA62OoTg/ZAP4=";
25 };
26
27 build-system = [
28 setuptools
29 setuptools-scm
30 ];
31
32 nativeBuildInputs = [
33 cython
34 numpy
35 oldest-supported-numpy
36 packaging
37 ];
38
39 dependencies = [ numpy ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 disabledTests = [
44 # Broken with Numpy 2.x, https://github.com/wmayner/pyemd/issues/68
45 "test_emd_samples_2"
46 "test_emd_samples_3"
47 ];
48
49 meta = with lib; {
50 description = "Python wrapper for Ofir Pele and Michael Werman's implementation of the Earth Mover's Distance";
51 homepage = "https://github.com/wmayner/pyemd";
52 changelog = "https://github.com/wmayner/pyemd/releases/tag/${version}";
53 license = licenses.mit;
54 maintainers = [ ];
55 };
56}