2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
h5py,
|
|
|
|
numpy,
|
|
|
|
six,
|
|
|
|
wasserstein,
|
|
|
|
pytestCheckHook,
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "energyflow";
|
|
|
|
version = "1.3.3";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pkomiske";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "EnergyFlow";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Ioyk0IpyxcDdL2+3zkUa6yydavyphoh4do7GCz5nG60=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "setup_requires=" "" \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
h5py
|
|
|
|
numpy
|
|
|
|
six
|
|
|
|
wasserstein
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pytestFlagsArray = [ "energyflow/tests" ];
|
2022-09-30 11:47:45 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"energyflow/tests/test_archs.py" # requires tensorflow
|
|
|
|
"energyflow/tests/test_emd.py" # requires "ot"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "energyflow" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package for the EnergyFlow suite of tools";
|
|
|
|
homepage = "https://energyflow.network/";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|