MAINT: fix defines for universal2 python builds of NumPy #22169
Merged
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.
When using a universal2 python (one that supports both x86-64 and arm64), there is confusion around the size of
long double
. On x86-64 it is 16 bytes, on arm64 it is 8 bytes. This confuses the automatic detection done insetup.py
which uses heuristics to determine the size in creating the build-onlyconfigure.h
header file. PR #20270 already overrides some of the affected macros, this PR adds in a few more used in thedragon4.c
routines. It also adds a hint toconfigure.h
for the next time I need to debug this.I tried this out on the xcode-provided universal2 python3.8. See also the comments where I slowly figured this out.