pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / numdifftools / default.nix
blob29dee4bbbaa4b69e04ad4b2e395243e21b87a58a
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   numpy,
6   pythonOlder,
7   scipy,
8 }:
10 buildPythonPackage rec {
11   pname = "numdifftools";
12   version = "0.9.41";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "pbrod";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-HYacLaowSDdrwkxL1h3h+lw/8ahzaecpXEnwrCqMCWk=";
22   };
24   propagatedBuildInputs = [
25     numpy
26     scipy
27   ];
29   # Tests requires algopy and other modules which are optional and/or not available
30   doCheck = false;
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   '';
41   pythonImportsCheck = [ "numdifftools" ];
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   };