How can I create a Python C extension wheel for MacOS that is backwards compatible (MacOS 10.9+) using MacOS 10.15?
This is what I have so far:
export MACOSX_DEPLOYMENT_TARGET=10.9
python -m pip wheel . -w wheels --no-deps
python -m pip install delocate
for whl in wheels/*.whl; do
delocate-wheel -w wheels_fixed -v "$whl"
done
Unfortunately, pip wheel
generates a file myapp-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
, and unlike auditwheel
on Linux, delocate-wheel
does not modify the name of the wheel. As a result, if I upload it on PyPI using twine
, only users with MacOS 10.15 are able to install it using pip
. I guess I could manually rename it to myapp-0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl
, but this does not sound right to me.
For the builds I am just using the GitHub Actions MacOS virtual machines.
Thank you.
PS: The compiler used for the build is GCC9