1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, h5py
5, numpy
6, six
7, wasserstein
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "EnergyFlow";
13 version = "1.3.2";
14
15 src = fetchFromGitHub {
16 owner = "pkomiske";
17 repo = pname;
18 rev = "v${version}";
19 hash = "sha256-fjT8c0ZTjdufP334upPzRVdTJDIBs84I7PkFu4CMcQw=";
20 };
21
22 postPatch = ''
23 substituteInPlace setup.cfg \
24 --replace "setup_requires=" "" \
25 --replace "pytest-runner" ""
26 '';
27
28 propagatedBuildInputs = [
29 h5py
30 numpy
31 six
32 wasserstein
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38 pytestFlagsArray = [
39 "energyflow/tests"
40 ];
41 disabledTestPaths = [
42 "energyflow/tests/test_archs.py" # requires tensorflow
43 "energyflow/tests/test_emd.py" # requires "ot"
44 ];
45
46 pythonImportsCheck = [ "energyflow" ];
47
48 meta = with lib; {
49 description = "Python package for the EnergyFlow suite of tools";
50 homepage = "https://energyflow.network/";
51 license = licenses.gpl3Only;
52 maintainers = with maintainers; [ veprbl ];
53 };
54}