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

Build wheels for arm64 on linux/mac #2070

Closed
wants to merge 1 commit into from

Conversation

georgemarshall
Copy link

@georgemarshall georgemarshall commented Feb 2, 2022

Summary

  • OS: Linux/macOS
  • Bug fix: no
  • Type: wheels
  • Fixes: -

Description

Change the build.yml to add aarch64/arm64 builds for M1 MacBooks. This covers both local and docker container use cases.

Closes #1782, closes #1945, closes #1954, closes #1966, closes #1972, closes #2090

@ddelange
Copy link

ddelange commented Apr 5, 2022

@georgemarshall could you add to your PR description Closes #1966, closes #1782, closes #2090, closes #1972, closes #1954, closes #1945 so the related issues get linked and will close upon merge?

Change the build.yml to add aarch64/arm64 builds

Closes giampaolo#1782, closes giampaolo#1945, closes giampaolo#1954, closes giampaolo#1966, closes giampaolo#1972,
closes giampaolo#2090

Signed-off-by: George Marshall <[email protected]>
@georgemarshall
Copy link
Author

@ddelange ticket numbers have been added to link the issues.

@consideRatio
Copy link

consideRatio commented Apr 19, 2022

@ddelange ticket numbers have been added to link the issues.

Hmmm @georgemarshall, the PR description isn't updated with "closes ..." notes etc, so issues will remain open if this PR is merged. I'm confused.

I'd recommend naming this PR something more genal as well as this PR is more general than just Apple M1 support. For example "Build wheels for arm64 on linux/mac"

Comment on lines +36 to +37
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes from https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2:

The dual-architecture universal2 has a few benefits, but a key benefit to a universal wheel is that a user can bundle these wheels into an application and ship a single binary.

However, if you have a large library, then you might prefer to ship the two single-arch wheels instead - x86_64 and arm64. In rare cases, you might want to build all three, but in that case, pip will not download the universal wheels, because it prefers the most specific wheel available.


Suggestion, remove universal2.

Suggested change
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "x86_64 arm64"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That came from the docs example for CIBW_ARCHS and is the default for auto.

@georgemarshall georgemarshall changed the title Add M1 MacBook support Build wheels for arm64 on linux/mac Apr 19, 2022
@warrenseine
Copy link

warrenseine commented May 20, 2022

@mayeut It looks like all your PRs are ready:

Any hope to see this merged soon and unlock this new wheel architecture?

Thank you so much!

@mayeut
Copy link
Contributor

mayeut commented May 21, 2022

@warrenseine,

@mayeut It looks like all your PRs are ready:

Any hope to see this merged soon and unlock this new wheel architecture?

This question shall be directed to @giampaolo
I provided some PRs but it's up to the maintainer of psutil to gauge interest in reviewing/merging those.
I'll gladly answer any question/remarks he can have in those PRs.

@rigogsilva
Copy link

@giampaolo 🙏

I believe this is forcing users to install Command Line Tools since there is no wheel available.

@giampaolo
Copy link
Owner

arm64 wheels for macOS were added as of #2040.
Linux arm64 wheels will not be supported for now as per my previous comment: #2103 (comment).

@giampaolo giampaolo closed this Oct 18, 2022
@rigogsilva
Copy link

Thanks @giampaolo! it is not forcing install of Command Line Tools for my M1 anymore. It uses the wheel. 😃

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