-
Notifications
You must be signed in to change notification settings - Fork 255
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
macOS: venvs lacking python3-config
causes some builds to fail
#2021
Comments
You should not depend on python3-config being present if you are in Python - instead, you should use |
tskisner
added a commit
to tskisner/spt3g_software
that referenced
this issue
Feb 19, 2025
- Bump vendored version of boost to 1.87, to enable support for numpy-2. - Bump cibuildwheel version and add a dependabot workflow to keep actions up to date. - Add a fix for macos wheel builds (see pypa/cibuildwheel#2021) - Add python-3.13 to the wheel build matrix. - Change no-as-needed linking option to be based on OS flavor rather than compiler. - Compile libflac as well as boost when building wheels. Bump this vendored version to 1.5.0 which includes threaded compression.
tskisner
added a commit
to CMB-S4/spt3g_software
that referenced
this issue
Feb 19, 2025
* Updates to wheel building - Bump vendored version of boost to 1.87, to enable support for numpy-2. - Bump cibuildwheel version and add a dependabot workflow to keep actions up to date. - Add a fix for macos wheel builds (see pypa/cibuildwheel#2021) - Add python-3.13 to the wheel build matrix. - Change no-as-needed linking option to be based on OS flavor rather than compiler. - Compile libflac as well as boost when building wheels. Bump this vendored version to 1.5.0 which includes threaded compression. * Try to restore netcdf in macos wheels
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Some more complex C/C++ libraries need
python3-config
to get ldflags, include directories, etc.On Linux, because each version of Python is in its own container, this works fine.
On macOS, because
cibuildwheel
relies entirely on virtualenvs and does not put/Library/Frameworks/Python.framework/Versions/{current_version}/bin
in PATH,python3-config
defaults to the system-wide Python 3.11/3.12 installation. Meaning any non-trivial C/C++ extensions may fail (and not even outright fail to build- wheels produced may fail to import because of missing symbols due to ABI breaks.)A fix to this would be to prepend
/Library/Frameworks/Python.framework/Versions/{current_version}/bin
toPATH
during builds.For users currently blocked by this, a possible workaround is adding this in your
CIBW_BEFORE_BUILD
:Build log
https://github.com/donn/cibw_clobber/actions/runs/11091306625/job/30814862405
CI config
https://github.com/donn/cibw_clobber/blob/main/.github/workflows/ci.yml
The text was updated successfully, but these errors were encountered: