2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
contexttimer,
|
|
|
|
setuptools,
|
|
|
|
versioneer,
|
|
|
|
cython_0,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyrevolve";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.2.4";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "pyproject";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "devitocodes";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-fcIq/zuKO3W7K9N2E4f2Q6ZVcssZwN/n8o9cCOYmr3E=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace ', "flake8"' ""
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython_0
|
2023-11-16 04:20:00 +00:00
|
|
|
setuptools
|
|
|
|
versioneer
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
contexttimer
|
|
|
|
numpy
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
rm -rf pyrevolve
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pyrevolve" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/devitocodes/pyrevolve";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/devitocodes/pyrevolve/releases/tag/v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Python library to manage checkpointing for adjoints";
|
|
|
|
license = licenses.epl10;
|
|
|
|
maintainers = with maintainers; [ atila ];
|
|
|
|
};
|
|
|
|
}
|