blob: 767d94ac0df9acd1d4149f414c6fd5ce6e58ab6e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, contexttimer
, versioneer
, cython
, numpy
, pytest
}:
buildPythonPackage rec {
pname = "pyrevolve";
version = "2.2";
src = fetchFromGitHub {
owner = "devitocodes";
repo = pname;
rev = "v${version}";
hash = "sha256-5a4zvyf2vfz8aI6vFMI2vxekYrcUi/YuPFvZnUOx+Zs=";
};
nativeBuildInputs = [ versioneer cython ];
propagatedBuildInputs = [ contexttimer numpy ];
nativeCheckInputs = [ pytest ];
# Using approach bellow bcs the tests fail with the pytestCheckHook, throwing the following error
# ImportError: cannot import name 'crevolve' from partially initialized module 'pyrevolve'
# (most likely due to a circular import)
checkPhase = ''
pytest
'';
pythonImportsCheck = [ "pyrevolve" ];
meta = with lib; {
homepage = "https://github.com/devitocodes/pyrevolve";
description = "Python library to manage checkpointing for adjoints";
license = licenses.epl10;
maintainers = with maintainers; [ atila ];
};
}
|