evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / wasserstein / default.nix
blobc9a9495b42ef322e618629c3cff1befe3fe8a696
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   numpy,
7   llvmPackages,
8   wurlitzer,
9   pytestCheckHook,
12 buildPythonPackage rec {
13   pname = "wasserstein";
14   version = "1.1.0";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "pkomiske";
19     repo = "Wasserstein";
20     rev = "v${version}";
21     hash = "sha256-s9en6XwvO/WPsF7/+SEmGePHZQgl7zLgu5sEn4nD9YE=";
22   };
24   patches = [
25     (fetchpatch {
26       url = "https://github.com/thaler-lab/Wasserstein/commit/8667d59dfdf89eabf01f3ae93b23a30a27c21c58.patch";
27       hash = "sha256-jp5updB3E1MYgLhBJwmBMTwBiFXtABMwTxt0G6xhoyA=";
28     })
29   ];
31   buildInputs = [ llvmPackages.openmp ];
32   propagatedBuildInputs = [
33     numpy
34     wurlitzer
35   ];
37   nativeCheckInputs = [ pytestCheckHook ];
38   pytestFlagsArray = [ "wasserstein/tests" ];
39   disabledTestPaths = [
40     "wasserstein/tests/test_emd.py" # requires "ot"
41     # cyclic dependency on energyflow
42     "wasserstein/tests/test_externalemdhandler.py"
43     "wasserstein/tests/test_pairwiseemd.py"
44   ];
46   pythonImportsCheck = [ "wasserstein" ];
48   meta = with lib; {
49     description = "Python/C++ library for computing Wasserstein distances efficiently";
50     homepage = "https://github.com/pkomiske/Wasserstein";
51     license = licenses.gpl3Only;
52     maintainers = with maintainers; [ veprbl ];
53   };