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