python3Packages.numpy: mass-rebuild clean up#244461
Merged
vcunat merged 2 commits intoNixOS:stagingfrom Jul 24, 2023
Merged
Conversation
This reverts commit 7ea07d2.
12 tasks
The test-skipping patch is conditionalized on python layer. I moved the conditional patch after the unconditional ones, too.
Comment on lines
+92
to
+93
| # Causes `error: argument unused during compilation: '-fno-strict-overflow'` due to `-Werror`. | ||
| hardeningDisable = lib.optionals stdenv.cc.isClang [ "strictoverflow" ]; |
Member
There was a problem hiding this comment.
We can't set the warn-error flag from here https://github.com/numpy/numpy/blob/0aaa5d397f86d5b4aef9c83053f65296a790e501/numpy/distutils/command/build.py#L17 somehow?
Member
Author
There was a problem hiding this comment.
That's more of a discussion for the original PR. Here I just move the line to simplify the expression.
I would expect that some -Wno-error approach would also work.
Contributor
There was a problem hiding this comment.
Doesn’t it make more sense to stop passing the unused argument than to hack at the build scripts to suppress the unused argument warning?
See #243595 regarding -fno-strict-overflow and Clang.
Comment on lines
+54
to
+73
| patches = [ | ||
| # f2py.f90mod_rules generates code with invalid function pointer conversions, which are | ||
| # clang 16 makes an error by default. | ||
| (fetchpatch { | ||
| url = "https://github.com/numpy/numpy/commit/609fee4324f3521d81a3454f5fcc33abb0d3761e.patch"; | ||
| hash = "sha256-6Dbmf/RWvQJPTIjvchVaywHGcKCsgap/0wAp5WswuCo="; | ||
| }) | ||
| ] | ||
| ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ | ||
|
|
||
| # Backport from 1.25. `platform.machine` returns `arm64` on aarch64-darwin, which causes | ||
| # differing results between `_selected_real_kind_func` and Fortran’s `selected_real_kind`. | ||
| (fetchpatch { | ||
| url = "https://github.com/numpy/numpy/commit/afcedf4b63f4a94187e6995c2adea0da3bb18e83.patch"; | ||
| hash = "sha256-cxBoimX5a9wC2qUIGAo5o/M2E9+eV63bV2/wLmfDYKg="; | ||
| }) | ||
| ] | ||
| ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ | ||
|
|
||
| # Disable `numpy/core/tests/test_umath.py::TestComplexFunctions::test_loss_of_precision[complex256]` | ||
| # on x86_64-darwin because it fails under Rosetta 2 due to issues with trig functions and | ||
| # 80-bit long double complex numbers. | ||
| ./disable-failing-long-double-test-Rosetta-2.patch | ||
| ] |
SuperSandro2000
approved these changes
Jul 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Things done
sandbox = trueset innix.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/)