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

Closed
wants to merge 1 commit into from
Closed

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.

@hoechenberger
Copy link

Hello, may I ask what the current status of this is? Do you need any more work or testing to be done before this PR will be considered for a merge? Thanks!

cc @larsoner

@shawaj
Copy link
Contributor Author

shawaj commented Jun 3, 2024

@hoechenberger I'm not sure. Happy to do more work to get it merged but haven't heard anything on this from @giampaolo since opening the PR so unclear what the status is sadly 😕

@hoechenberger
Copy link

hoechenberger commented Jun 9, 2024

Hello @giampaolo, what are your thoughts on this? This is something that's important e.g. to users on Apple Silicon.

@shawaj
Copy link
Contributor Author

shawaj commented Jun 18, 2024

@giampaolo #2425 does not close this PR and is missing a bunch of stuff from it.

Real shame that after all this you have just closed this PR and fixed just a subset of the issues.

@shawaj
Copy link
Contributor Author

shawaj commented Jun 18, 2024

@giampaolo at the very least can you merge #2126 or something similar please

@giampaolo
Copy link
Owner

@shawaj: sorry for closing this out, but the PR I just merged predated your PR (see original #2103 from 2 years ago). Also the changes to build.yml are simpler in #2425.

The exclusion of ppc64le, s390x and musl architectures / wheels is a deliberate choice, at least for now, see #2425 (comment).

As to why I've refrained from adding new builds / architectures to the CI matrix for so long see old #2103 (comment). Nothing personal here, it's just that this is a big project and I'm alone, so I'm cautious with adding extra work which I know I won't be able to keep up with.

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
10 participants