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