`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / python-modules / pmdarima / default.nix
blob5a98e4569a32746c40d7403d21c0c392e8622300
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   cython,
6   joblib,
7   matplotlib,
8   numpy,
9   pandas,
10   scikit-learn,
11   scipy,
12   statsmodels,
13   urllib3,
14   pythonOlder,
15   python,
16   pytest7CheckHook,
17   setuptools,
20 buildPythonPackage rec {
21   pname = "pmdarima";
22   version = "2.0.4";
23   pyproject = true;
25   disabled = pythonOlder "3.7";
27   src = fetchFromGitHub {
28     owner = "alkaline-ml";
29     repo = "pmdarima";
30     tag = "v${version}";
31     hash = "sha256-LHwPgQRB/vP3hBM8nqafoCrN3ZSRIMWLzqTqDOETOEc=";
32   };
34   postPatch = ''
35     substituteInPlace pyproject.toml \
36       --replace-fail "numpy==" "numpy>=" \
37       --replace-fail "scipy==" "scipy>=" \
38       --replace-fail "statsmodels==" "statsmodels>="
39   '';
41   env = {
42     GITHUB_REF = "refs/tags/v${version}";
43   };
45   preBuild = ''
46     python build_tools/get_tag.py
47   '';
49   nativeBuildInputs = [ cython ];
51   build-system = [
52     setuptools
53   ];
55   dependencies = [
56     joblib
57     numpy
58     pandas
59     scikit-learn
60     scipy
61     statsmodels
62     urllib3
63   ];
65   # Make sure we're running the tests for the actually installed
66   # package, so that cython's compiled files are available.
67   preCheck = ''
68     cd $out/${python.sitePackages}
69   '';
71   nativeCheckInputs = [
72     matplotlib
73     pytest7CheckHook
74   ];
76   disabledTests = [
77     # touches internet
78     "test_load_from_web"
79   ];
81   pythonImportsCheck = [ "pmdarima" ];
83   meta = {
84     description = "Statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function";
85     homepage = "https://github.com/alkaline-ml/pmdarima";
86     changelog = "https://github.com/alkaline-ml/pmdarima/releases/tag/v${version}";
87     license = lib.licenses.mit;
88     maintainers = with lib.maintainers; [ mbalatsko ];
89   };