2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, contexttimer
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2022-04-27 09:35:20 +00:00
|
|
|
, versioneer
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython_0
|
2022-04-27 09:35:20 +00:00
|
|
|
, numpy
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, 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
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
rm -rf pyrevolve
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +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 ];
|
|
|
|
};
|
|
|
|
}
|