about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pandas/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pandas/default.nix')
-rw-r--r--pkgs/development/python-modules/pandas/default.nix46
1 files changed, 20 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix
index 3323c5c9a83b..9c707351f209 100644
--- a/pkgs/development/python-modules/pandas/default.nix
+++ b/pkgs/development/python-modules/pandas/default.nix
@@ -3,14 +3,12 @@
   stdenv,
   buildPythonPackage,
   fetchFromGitHub,
-  pythonAtLeast,
   pythonOlder,
 
   # build-system
   cython,
   meson-python,
   meson,
-  oldest-supported-numpy,
   pkg-config,
   versioneer,
   wheel,
@@ -66,7 +64,7 @@
 let
   pandas = buildPythonPackage rec {
     pname = "pandas";
-    version = "2.2.2";
+    version = "2.2.3";
     pyproject = true;
 
     disabled = pythonOlder "3.9";
@@ -75,29 +73,25 @@ let
       owner = "pandas-dev";
       repo = "pandas";
       rev = "refs/tags/v${version}";
-      hash = "sha256-+zQKrsJmP3FJeOiYwNH1u96+/ECDHQF39evzur3cKjc=";
+      hash = "sha256-6YUROcqOV2P1AbJF9IMBIqTt7/PSTeXDwGgE4uI9GME=";
     };
 
     postPatch = ''
       substituteInPlace pyproject.toml \
-        --replace-fail "Cython==3.0.5" "Cython>=3.0.5" \
         --replace-fail "meson-python==0.13.1" "meson-python>=0.13.1" \
         --replace-fail "meson==1.2.1" "meson>=1.2.1" \
-        --replace-fail "numpy>=2.0.0rc1" "numpy"
+        --replace-fail "numpy>=2.0" "numpy"
     '';
 
-    nativeBuildInputs =
-      [
-        cython
-        meson-python
-        meson
-        numpy
-        pkg-config
-        versioneer
-        wheel
-      ]
-      ++ versioneer.optional-dependencies.toml
-      ++ lib.optionals (pythonOlder "3.12") [ oldest-supported-numpy ];
+    nativeBuildInputs = [
+      cython
+      meson-python
+      meson
+      numpy
+      pkg-config
+      versioneer
+      wheel
+    ] ++ versioneer.optional-dependencies.toml;
 
     enableParallelBuilding = true;
 
@@ -108,7 +102,7 @@ let
       tzdata
     ];
 
-    passthru.optional-dependencies =
+    optional-dependencies =
       let
         extras = {
           aws = [ s3fs ];
@@ -183,12 +177,12 @@ let
         pytest-xdist
         pytestCheckHook
       ]
-      ++ lib.flatten (lib.attrValues passthru.optional-dependencies)
-      ++ lib.optionals (stdenv.isLinux) [
+      ++ lib.flatten (lib.attrValues optional-dependencies)
+      ++ lib.optionals (stdenv.hostPlatform.isLinux) [
         # for locale executable
         glibc
       ]
-      ++ lib.optionals (stdenv.isDarwin) [
+      ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
         # for locale executable
         adv_cmds
       ];
@@ -213,13 +207,13 @@ let
         # AssertionError: Did not see expected warning of class 'FutureWarning'
         "test_parsing_tzlocal_deprecated"
       ]
-      ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+      ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
         # tests/generic/test_finalize.py::test_binops[and_-args4-right] - AssertionError: assert {} == {'a': 1}
         "test_binops"
         # These tests are unreliable on aarch64-darwin. See https://github.com/pandas-dev/pandas/issues/38921.
         "test_rolling"
       ]
-      ++ lib.optional stdenv.is32bit [
+      ++ lib.optional stdenv.hostPlatform.is32bit [
         # https://github.com/pandas-dev/pandas/issues/37398
         "test_rolling_var_numerical_issues"
       ];
@@ -234,7 +228,7 @@ let
       ''
       # TODO: Get locale and clipboard support working on darwin.
       #       Until then we disable the tests.
-      + lib.optionalString stdenv.isDarwin ''
+      + lib.optionalString stdenv.hostPlatform.isDarwin ''
         # Fake the impure dependencies pbpaste and pbcopy
         echo "#!${runtimeShell}" > pbcopy
         echo "#!${runtimeShell}" > pbpaste
@@ -246,7 +240,7 @@ let
 
     meta = with lib; {
       # pandas devs no longer test i686, it's commonly broken
-      # broken = stdenv.isi686;
+      # broken = stdenv.hostPlatform.isi686;
       changelog = "https://pandas.pydata.org/docs/whatsnew/index.html";
       description = "Powerful data structures for data analysis, time series, and statistics";
       downloadPage = "https://github.com/pandas-dev/pandas";