-
Notifications
You must be signed in to change notification settings - Fork 280
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
BLD: build wheels for CPython 3.11 #4076
Conversation
it's not working out of the box for win32 + CPython 3.11 |
b02bc07
to
6e4d4ff
Compare
So it's actually failing for ALL CPython 3.11 + windows builds.
For reference, these identifiers are documented as Windows-only: and so is the code block where they appear in |
c68e858
to
7710264
Compare
@@ -1,6 +1,7 @@ | |||
#include <math.h> | |||
#ifdef MS_WIN32 | |||
#include "malloc.h" | |||
#include <float.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_fpclass
, _FPCLASS_NN
and _FPCLASS_PN
are Windows only symbols defined in <float.h>
. It seems that CPython 3.10 and older leak <float.h>
, but CPython 3.11 doesn't, hence the fix.
7710264
to
2c2ce4d
Compare
CIBW_SKIP: "*-musllinux_*" # numpy doesn't have wheels for musllinux so we can't build some quickly and without bloating | ||
CIBW_ARCHS_LINUX: "x86_64" | ||
CIBW_ARCHS_MACOS: x86_64 arm64 | ||
CIBW_ARCHS_WINDOWS: "auto" | ||
CIBW_ENVIRONMENT: "LDFLAGS='-static-libstdc++'" | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_BEFORE_BUILD: "rm -rf build/" # working around .so files accumulation between builds leading up to bloated wheels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that the total wheel size doesn't change by removing this line
this now also clears #4077 |
os: [ | ||
ubuntu-18.04, | ||
ubuntu-20.04, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #4077 here
b6c37d6
to
e96e072
Compare
@Xarthisius can you have a look ? |
# this is required for cartopy. It should normally be specified in our setup.cfg as | ||
# cartopy[plotting] | ||
# However it doesn't work on Ubuntu 18.04 (used in CI at the time of writing) | ||
python -m pip install shapely --no-binary=shapely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember that causing problems in envs different than 18.04 too. Is really worth dropping? This way we ensure that shapely builds against the same libraries as cartopy. Unless of course they've fixed all that mess upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good call, I guess the comment isn't accurate enough then. I can revert this change.
I also note that we actually install cartopy only on Windows (via conda), so do you think this block should be moved to the windows-only part of the script ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought [full]
brings it in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't. That's because cartopy doesn't ship wheels on PyPI, only source distro, and building it from source very often breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but that script is also used in testing right? Cause otherwise why would we add it in the first place if nothing uses it? It must have been failing at some point and that was the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it may be a leftover from a time we did try to have cartopy
in [full]
, but honestly not sure. I'm happy to do a pure, conservative revert if you think it's best.
for reference the problem seems to still be real, see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I dropped this commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except that one comment LGTM!
…s the affected packages even without them, but this behaviour is deprecated)
0b966de
to
305c09c
Compare
@Xarthisius should someone else take a look too, or is this good to go ? |
PR Summary
Upgrade CIBuildWheel now with support for CPython 3.11
In short, CPython 3.11 has reached ABI stability with their first release candidate (3.11.0-rc1), so it's now safe to build wheels for it, even if the final release isn't out yet (expected early October).
Note that numpy has already successfully published some wheels for CPyhton 3.11 (look for "cp311" at https://pypi.org/simple/numpy/) with similar infrastructure.