Skip to content
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

Please provide ARM (or universal) MacOS wheels for Python 3.10 and 3.9 #882

Open
PrimozGodec opened this issue Mar 21, 2024 · 4 comments
Open

Comments

@PrimozGodec
Copy link
Contributor

PyPI is missing Arm64 (or Universal) wheels for Python 3.10 and 3.9. They are available for Python 3.11 and 3.12. I wanted to make a PR where I would introduce Unversal2 wheels for Python 3.10 and 3.9, but I couldn't find where it is set which version of wheels is built.

I can help with providing the mentioned wheels, but please help me understand what is preventing building or where it is set that only x86_64 wheels are built.

@ehooi
Copy link

ehooi commented May 11, 2024

I want those wheels too.

I think a thread about wheel is a clue.

By default, it picks up whatever CPython is built with. If you use a universal2 copy of Python, it guesses you are making universal wheels too.

Another clue is actions/setup-python document and python versions

macOS:

For Python < 3.11, the official Python sources are downloaded from python.org, built using the make tool, and archived along with the installation script for further distribution and installation. For backward compatibility, we build each Python version against the oldest version of macOS that is available at the time the Python version is released.
For Python >= 3.11, the official macOS universal2 Python binaries are simply downloaded from python.org and archived along with the installation script for further distribution and installation.

The first link suggests using cibuildwheel, but I think that change is something big.
So far, these are the things I've found. I'll think more about how to fix it.

@ehooi
Copy link

ehooi commented May 11, 2024

export _PYTHON_HOST_PLATFORM=macosx-12.0-universal2
export ARCHFLAGS="-arch arm64 -arch x86_64"

I built the package with above env vars in my M1 Macbook, I got this one.

pymssql-2.3.0-cp39-cp39-macosx_12_0_universal2.whl
825,267 bytes

Without vars, I got this one.

pymssql-2.3.0-cp39-cp39-macosx_12_0_arm64.whl
512,170 bytes

Applying variables to the workflow seems straightforward, but I'm uncertain about hardcoding the string "macosx-12.0-universal2".

@PrimozGodec
Copy link
Contributor Author

@ehooi, maybe the easiest would be to switch to cibuildwheel (I hope I am not wrong). I can try it when I have time.

Otherwise, what you found out makes sense.

@ehooi
Copy link

ehooi commented May 15, 2024

I already made a PR, without cibuildwheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants