-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
BLD/CI: build macOS x86-64 wheel on macos-14 as a cross build #29756
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
Conversation
The macos-13 image is deprecated, meaning GitHub Actions no longer offers x86-64 runners. Hence we need to cross compile. Cibuildwheel runs the tests under Rosetta2, and that works fine once we skip a couple of problematic cases. A few of the changes in the macOS section were simple cleanups to bring things back in sync with the `numpy-release` repo. E.g., the F77/F90 env vars were distutils-specific and no longer used, and the `DYLD_LIBRARY_PATH` usage was also unnecessary.
| # We're cross compiling; the before-build hook isn't using Rosetta (see cibuildwheel#2592) | ||
| mkdir host-env | ||
| python -m pip install -r $PROJECT_DIR/requirements/ci_requirements.txt --platform macosx_10_13_x86_64 --only-binary :all: -U --target ./host-env | ||
| # Use a handwritten .pc file, because we can't run the cross Python to generate it |
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.
tab instead of spaces - needs fixing
| @@ -0,0 +1,12 @@ | |||
| libdir=/Users/runner/work/numpy/numpy/host-env/scipy_openblas64/lib | |||
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.
This file should be generated by a script. The problem with scipy-openblas is that it has a function to generate the .pc file, but it relies on dlopen-ing the shared library, which won't work for cross builds.
|
@rgommers please accept my apology, I thought it would be easier to do that this. cibuildwheel takes care of this for me for my personal project, but that doesn't use meson/etc and is a lot simpler. |
|
@andyfaff no worries at all, no need to apologize. If things "just work" it's natural to assume it will do so for |
|
@rgommers, in pypa/cibuildwheel#2601 I've changed the images to use the new P.S. Probably by the time GitHub deprecates support for these images (a couple of years, perhaps), support for the platform in general would be at its twilight. I suppose the cross-compilation experiment here is still worth trying, of course – for other platform/architecture combos, if not macOS ARM ➡️ macOS Intel. |
|
MacOS Intel runners on 15, awesome. Didn't know about that. |
|
Agreed - great news on the new runner images, so we can close this. |
The macos-13 image is deprecated, meaning GitHub Actions no longer offers x86-64 runners. Hence we need to cross compile. Cibuildwheel runs the tests under Rosetta2, and that works fine once we skip a couple of problematic cases.
A few of the changes in the macOS section were simple cleanups to bring things back in sync with the
numpy-releaserepo. E.g., the F77/F90 env vars were distutils-specific and no longer used, and theDYLD_LIBRARY_PATHusage was also unnecessary.Closes gh-29728
Opened as Draft PR because the
.pcfile handling needs cleaning up and it's not yet 100% clear ifcibuildwheelwon't change how this works (xref pypa/cibuildwheel#2592).