1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 numpy, 7 packaging, 8 pandas, 9 patsy, 10 scipy, 11 setuptools, 12 setuptools-scm, 13 stdenv, 14}: 15 16buildPythonPackage rec { 17 pname = "statsmodels"; 18 version = "0.14.5"; 19 pyproject = true; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-3iYOWMzP0s7d+DW1WjVyM9bKhToapPkPdVOlLMccbd8="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail 'setuptools_scm[toml]>=8,<9' 'setuptools_scm[toml]' 29 ''; 30 31 build-system = [ 32 cython 33 numpy 34 scipy 35 setuptools 36 setuptools-scm 37 ]; 38 39 env = lib.optionalAttrs stdenv.cc.isClang { 40 NIX_CFLAGS_COMPILE = toString [ 41 "-Wno-error=implicit-function-declaration" 42 "-Wno-error=int-conversion" 43 ]; 44 }; 45 46 dependencies = [ 47 numpy 48 packaging 49 pandas 50 patsy 51 scipy 52 ]; 53 54 # Huge test suites with several test failures 55 doCheck = false; 56 57 pythonImportsCheck = [ "statsmodels" ]; 58 59 meta = with lib; { 60 description = "Statistical computations and models for use with SciPy"; 61 homepage = "https://www.github.com/statsmodels/statsmodels"; 62 changelog = "https://github.com/statsmodels/statsmodels/releases/tag/v${version}"; 63 license = licenses.bsd3; 64 }; 65}