python312Packages.scipy: Allow building with Numpy 1

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