1{ lib
2, buildPythonPackage
3, cython
4, fetchpatch
5, fetchPypi
6, matplotlib
7, numpy
8, oldest-supported-numpy
9, pandas
10, patsy
11, pythonOlder
12, scipy
13, setuptools-scm
14, wheel
15}:
16
17buildPythonPackage rec {
18 pname = "statsmodels";
19 version = "0.14.0";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-aHXH1onpZtlI8V64FqtWFvSShwaxgM9HD9WQerb2R6Q=";
27 };
28
29 patches = [
30 # https://github.com/statsmodels/statsmodels/pull/8969
31 (fetchpatch {
32 name = "unpin-setuptools-scm.patch";
33 url = "https://github.com/statsmodels/statsmodels/commit/cfad8d81166e9b1392ba99763b95983afdb6d61b.patch";
34 hash = "sha256-l7cQHodkPm399a+3qIVmXPk/Ca+CqJDyWXWgjb062nM=";
35 })
36 ];
37
38 nativeBuildInputs = [
39 cython
40 oldest-supported-numpy
41 setuptools-scm
42 wheel
43 ];
44
45 propagatedBuildInputs = [
46 numpy
47 scipy
48 pandas
49 patsy
50 matplotlib
51 ];
52
53 # Huge test suites with several test failures
54 doCheck = false;
55
56 pythonImportsCheck = [
57 "statsmodels"
58 ];
59
60 meta = with lib; {
61 description = "Statistical computations and models for use with SciPy";
62 homepage = "https://www.github.com/statsmodels/statsmodels";
63 changelog = "https://github.com/statsmodels/statsmodels/releases/tag/v${version}";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ fridh ];
66 };
67}