diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pandas/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pandas/default.nix | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pandas/default.nix b/nixpkgs/pkgs/development/python-modules/pandas/default.nix index 588dae7b7840..7351e6536416 100644 --- a/nixpkgs/pkgs/development/python-modules/pandas/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pandas/default.nix @@ -2,10 +2,12 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, pythonAtLeast , pythonOlder # build-system , cython +, cython_3 , meson-python , meson , oldest-supported-numpy @@ -23,7 +25,6 @@ , beautifulsoup4 , bottleneck , blosc2 -, brotlipy , fsspec , gcsfs , html5lib @@ -39,7 +40,6 @@ , pymysql , pyqt5 , pyreadstat -, python-snappy , qtpy , s3fs , scipy @@ -63,9 +63,9 @@ , runtimeShell }: -buildPythonPackage rec { +let pandas = buildPythonPackage rec { pname = "pandas"; - version = "2.1.1"; + version = "2.1.3"; pyproject = true; disabled = pythonOlder "3.9"; @@ -74,17 +74,19 @@ buildPythonPackage rec { owner = "pandas-dev"; repo = "pandas"; rev = "refs/tags/v${version}"; - hash = "sha256-6SgW4BtO7EFnS8P8LL4AGk5EdPwOQ0+is0wXgqsm9w0="; + hash = "sha256-okGYzPJC3mpG+Sq4atjWwLlocUDnpjgGRPmQ+4ehQX0="; }; postPatch = '' substituteInPlace pyproject.toml \ + --replace "Cython>=0.29.33,<3" "Cython" \ --replace "meson-python==0.13.1" "meson-python>=0.13.1" \ --replace "meson==1.2.1" "meson>=1.2.1" ''; nativeBuildInputs = [ - cython + # TODO: hack to support pandas on python3.12, remove with pandas 2.2.0 + (if pythonAtLeast "3.12" then cython_3 else cython) meson-python meson numpy @@ -116,8 +118,6 @@ buildPythonPackage rec { qtpy ]; compression = [ - brotlipy - python-snappy zstandard ]; computation = [ @@ -187,16 +187,23 @@ buildPythonPackage rec { all = lib.concatLists (lib.attrValues extras); }; + doCheck = false; # various infinite recursions + + passthru.tests.pytest = pandas.overridePythonAttrs (_: { doCheck = true; }); + nativeCheckInputs = [ glibcLocales hypothesis pytest-asyncio pytest-xdist pytestCheckHook - ] ++ lib.optionals (stdenv.isLinux) [ + ] + ++ lib.flatten (lib.attrValues passthru.optional-dependencies) + ++ lib.optionals (stdenv.isLinux) [ # for locale executable glibc - ] ++ lib.optionals (stdenv.isDarwin) [ + ] + ++ lib.optionals (stdenv.isDarwin) [ # for locale executable adv_cmds ]; @@ -263,4 +270,5 @@ buildPythonPackage rec { ''; maintainers = with maintainers; [ raskin fridh knedlsepp ]; }; -} +}; +in pandas |