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

wheels: add arm64 builds #2224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

shawaj
Copy link
Contributor

@shawaj shawaj commented Apr 10, 2023

Summary

Description

  • add arm64 builds via qemu
  • add macos universal2 build
  • add windows arm64 build
  • bump cancel workflow action to latest to remove nodejs warnings
  • bump cibuildwheel action to latest

- add arm64, ppc64le, s390x builds via qemu
- add macos universal2 build
- add windows arm64 build
- bump cancel workflow action to latest to remove nodejs warnings
- bump cibuildwheel action to latest

Signed-off-by: Aaron Shaw <[email protected]>
@ben9923
Copy link
Contributor

ben9923 commented Apr 14, 2023

(everything related to musllinux was copied from #2126 yet not even mentioned in the PR description...)

@tsukumijima
Copy link

@giampaolo This PR looks very promising.
I use psutil on an arm64 device, but since I don't have a prebuilt arm64 wheel, I have to go to the trouble of installing build-essential and building it each time.
Considering the extra dependencies required to build psutil, and the fact that arm64 devices are often underpowered and take a lot of time to build, I would prefer to have a pre-built arm64 wheel available from PyPI.
Could you please merge this PR? Please consider it.

@carlthome
Copy link

Ran into the same issue just now when debugging a Docker image on a MacBook Air M1. Would be great if there were arm64 wheels on PyPI.

@shawaj
Copy link
Contributor Author

shawaj commented May 14, 2023

(everything related to musllinux was copied from #2126 yet not even mentioned in the PR description...)

@ben9923 I didn't copy anything from your PR but happy to add attribution and combine them since yours clearly came before mine.

You probably should have reached out to me privately though before making false accusations of this kind though!

@ben9923
Copy link
Contributor

ben9923 commented May 14, 2023

(everything related to musllinux was copied from #2126 yet not even mentioned in the PR description...)

@ben9923 I didn't copy anything from your PR but happy to add attribution and combine them since yours clearly came before mine.

You probably should have reached out to me privately though before making false accusations of this kind though!

I highly doubt those package install commands made to run, for example, some missing network tests (on already supported platforms) came from nowhere, but anyway mostly said it because your PR description doesn't even mention any of the changes that are highlighted in my PR and are included in yours.

I don't really care about the credit for some yaml lines, just want some wheels 😛

@shawaj
Copy link
Contributor Author

shawaj commented May 14, 2023

@ben9923 anyone who was trying to get this to work with tests passing etc would have to add the same stuff. So it's hardly a surprise.

I was originally trying to get PyPy to work too as well as some builds for py2 on Windows but ran out of time and gave up on those bits as they were non essential for what I was doing at the time.

In any case, as you say, just need more wheels so hopefully this gets pulled in one way or another 👍😎

@carlthome
Copy link

Yes, wheels on PyPI would be great. In my book you're both stars for working on fixing this @ben9923 @shawaj

@dhpollack
Copy link

I have also run into this issue.

@wicol
Copy link

wicol commented Oct 24, 2023

Hey this looks promising! I can't tell from the diff. Would this yield an arm64 wheel for python 3.12 or just some older versions?

@rkechols
Copy link

rkechols commented Jan 2, 2024

Adding my upvote to get this merged.

In my experience, lots of tech companies now supply devs with Mac laptops that are arm64. Building a linux-based docker image that uses psutil doesn't work naturally without the linux+arm64 wheels. This PR would make things work "out of the box" for that common scenario.

For anyone looking for workarounds in the meantime, I've found a few options:

  • make sure your docker image has system packages like build-essential installed so it can build psutil from source (hopefully). I'd recommend doing a multi-stage dockerfile so the build-essential system packages aren't in your final image
  • build the docker image with non-native architecture so a pre-built wheel can be used. example command: docker build --platform=linux/amd64 -t my-docker-image .
  • build your own wheel of psutil for linux+arm64, and make sure it's accessible to your docker build. for example, you could host the wheel(s) in your own private python package index and use an arg like --extra-index-url to point pip to the private index

@CAM-Gerlach
Copy link

Just FWIW, GitHub now offers free standard GHA runners for macOS arm64, and to my understanding there are active plans to offer Linux and Windows arm64 support within the next ≈year.

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

Successfully merging this pull request may close these issues.

ARM64 support
8 participants