python312Packages.pandas: Allow building with Numpy 1

+12
+12
pkgs/development/python-modules/pandas/default.nix
··· 84 }) 85 ]; 86 87 postPatch = '' 88 substituteInPlace pyproject.toml \ 89 --replace-fail "meson-python==0.13.1" "meson-python>=0.13.1" \ 90 --replace-fail "meson==1.2.1" "meson>=1.2.1" 91 '';
··· 84 }) 85 ]; 86 87 + # A NOTE regarding the Numpy version relaxing: Both Numpy versions 1.x & 88 + # 2.x are supported. However upstream wants to always build with Numpy 2, 89 + # and with it to still be able to run with a Numpy 1 or 2. We insist to 90 + # perform this substitution even though python3.pkgs.numpy is of version 2 91 + # nowadays, because our ecosystem unfortunately doesn't allow easily 92 + # separating runtime and build-system dependencies. See also: 93 + # 94 + # https://discourse.nixos.org/t/several-comments-about-priorities-and-new-policies-in-the-python-ecosystem/51790 95 + # 96 + # Being able to build (& run) with Numpy 1 helps for python environments 97 + # that override globally the `numpy` attribute to point to `numpy_1`. 98 postPatch = '' 99 substituteInPlace pyproject.toml \ 100 + --replace-fail "numpy>2.0.0,<2.5" numpy \ 101 --replace-fail "meson-python==0.13.1" "meson-python>=0.13.1" \ 102 --replace-fail "meson==1.2.1" "meson>=1.2.1" 103 '';