You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to PATH during builds.
For users currently blocked by this, a possible workaround is adding this in your CIBW_BEFORE_BUILD:
You should not depend on python3-config being present if you are in Python - instead, you should use sysconfig directly. (Or use a modern build system like scikit-build-core or meson-python).
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: