2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-01-11 07:51:40 +00:00
|
|
|
, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, numpy
|
2024-04-21 15:54:59 +00:00
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
|
|
|
, patsy
|
2023-01-11 07:51:40 +00:00
|
|
|
, pythonOlder
|
|
|
|
, scipy
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2023-01-11 07:51:40 +00:00
|
|
|
, setuptools-scm
|
2024-05-15 15:35:15 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "statsmodels";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.14.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-iQVQFHrTqBzaJPC6GlxAIa3BYBCAvQDhka581v7s1q0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "numpy>=2.0.0rc1,<3" "numpy"
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-01-11 07:51:40 +00:00
|
|
|
cython
|
2024-05-15 15:35:15 +00:00
|
|
|
numpy
|
2024-04-21 15:54:59 +00:00
|
|
|
scipy
|
|
|
|
setuptools
|
2023-01-11 07:51:40 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-01-11 07:51:40 +00:00
|
|
|
numpy
|
2024-04-21 15:54:59 +00:00
|
|
|
packaging
|
2023-01-11 07:51:40 +00:00
|
|
|
pandas
|
|
|
|
patsy
|
2024-04-21 15:54:59 +00:00
|
|
|
scipy
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Huge test suites with several test failures
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"statsmodels"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Statistical computations and models for use with SciPy";
|
|
|
|
homepage = "https://www.github.com/statsmodels/statsmodels";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/statsmodels/statsmodels/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
2024-05-15 15:35:15 +00:00
|
|
|
# Fails at build time
|
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|