-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python312Packages.scipy: use numpy.coreIncludeDir #340832
Conversation
ofborg's evaluation should report no rebuilds, and so this should be good to go trivially. |
Why do we need |
It can become too long to condition stuff based on this. I was even thinking of demonstrating the usage of it in e.g: diff --git i/pkgs/development/python-modules/h5py/default.nix w/pkgs/development/python-modules/h5py/default.nix
index 13a464dccb4c..53b85662007d 100644
--- i/pkgs/development/python-modules/h5py/default.nix
+++ w/pkgs/development/python-modules/h5py/default.nix
@@ -49,7 +49,7 @@ buildPythonPackage rec {
# avoid strict pinning of numpy, can't be replaced with pythonRelaxDepsHook,
# see: https://github.com/NixOS/nixpkgs/issues/327941
- postPatch = ''
+ postPatch = lib.optionals (!numpy.isNumpy2) ''
substituteInPlace pyproject.toml \
--replace-fail "numpy >=2.0.0rc1" "numpy"
'';
diff --git i/pkgs/development/python-modules/matplotlib/default.nix w/pkgs/development/python-modules/matplotlib/default.nix
index 2bcf4d246c45..a372aaa228dc 100644
--- i/pkgs/development/python-modules/matplotlib/default.nix
+++ w/pkgs/development/python-modules/matplotlib/default.nix
@@ -109,9 +109,10 @@ buildPythonPackage rec {
# With the following patch we just hard-code these paths into the install
# script.
postPatch =
- ''
+ lib.optionalString (!numpy.isNumpy2) ''
substituteInPlace pyproject.toml \
--replace-fail '"numpy>=2.0.0rc1,<2.3",' ""
+ '' + ''
patchShebangs tools
''
+ lib.optionalString (stdenv.isLinux && interactive) '' But I'm not sure if you'll like this. The same can be done for |
That |
347bc57
to
a63b474
Compare
OK that makes sense. In #338334 it was useful to apply that substitution conditionally, in order to catch multiple conflicting numpys in the PYTHONPATH before building, but that is now less relevant. |
Description of changes
Things done
nix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.