1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 numpy, 6 pythonOlder, 7 scipy, 8}: 9 10buildPythonPackage rec { 11 pname = "numdifftools"; 12 version = "0.9.41"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "pbrod"; 19 repo = "numdifftools"; 20 rev = "v${version}"; 21 hash = "sha256-HYacLaowSDdrwkxL1h3h+lw/8ahzaecpXEnwrCqMCWk="; 22 }; 23 24 propagatedBuildInputs = [ 25 numpy 26 scipy 27 ]; 28 29 # Tests requires algopy and other modules which are optional and/or not available 30 doCheck = false; 31 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace '"pytest-runner"' "" 35 # Remove optional dependencies 36 substituteInPlace requirements.txt \ 37 --replace "algopy>=0.4" "" \ 38 --replace "statsmodels>=0.6" "" 39 ''; 40 41 pythonImportsCheck = [ "numdifftools" ]; 42 43 meta = with lib; { 44 description = "Library to solve automatic numerical differentiation problems in one or more variables"; 45 homepage = "https://github.com/pbrod/numdifftools"; 46 license = licenses.bsd3; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}