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

No arm64 wheels #15

Closed
joeyballentine opened this issue Sep 15, 2022 · 6 comments
Closed

No arm64 wheels #15

joeyballentine opened this issue Sep 15, 2022 · 6 comments

Comments

@joeyballentine
Copy link

Pasteboard currently has no arm64 wheels, which can cause installs to fail on M1 MacBooks.

@tobywf
Copy link
Owner

tobywf commented Sep 17, 2022

Pasteboard also has no wheels for recent Python versions; they keep adding new ones 😅. As far as I can see, the GitHub provided macOS runners are x86. If you would like to sponsor/provide M1 runners, let me know.

@joeyballentine
Copy link
Author

You don't actually need an M1 runner to build for arm64. At least with cmake (which I have been told just runs clang under the hood), you can cross compile for arm64, and with cibuildwheel you can build an arm64 whl file, all on an x64 runner. Here's just one example: https://github.com/joeyballentine/ncnn-vulkan-python/blob/92eab45bd7c3c3392c1d3137898ab461f6d9b591/.github/workflows/release.yml#L286

@tobywf
Copy link
Owner

tobywf commented Oct 4, 2022

The project doesn't use cmake. cibuildwheels seems like a cool project, but isn't trivial to integrate. E.g. there is no point building linux or windows wheels. And it's surprisingly complicated under the hood.

I was able to get clang to output a universal object file. But then linking it always produces a single arch shared object. It seems like you either have to output two wheels (one per arch), or fuse the shared objects via lipo. I'm not really sure why this can't be done by the linker... And I'm not really sure how to do this with setup.py/build.py for poetry.

I'm sure it's possible, but right now, I don't have the time to investigate this further.

@joeyballentine
Copy link
Author

You don't need to use cibuildwheel to build all those things, you can configure it to just build for a specific platform. Check out the action config I sent you, it's configured for just macos.

As for the universal .so file, you can use cibuildwheel to build a universal2 wheel that can support both. And all cibuildwheel does it runs your setup.py inside its own environment that lets you build these special wheels. It's really not as complex as you make it out to be

@tobywf
Copy link
Owner

tobywf commented Oct 4, 2022

It's really not as complex as you make it out to be

Yeah, that's not going to fly. pasteboard is provided as is, and as I mentioned I don't have the time. I'll assume you meant no offence, but I won't be insulted. If you would like to cut a PR for this, please go ahead.

@tobywf tobywf closed this as completed Oct 4, 2022
Repository owner locked and limited conversation to collaborators Oct 4, 2022
Repository owner unlocked this conversation Oct 17, 2022
@tobywf tobywf reopened this Oct 17, 2022
@tobywf
Copy link
Owner

tobywf commented Jan 15, 2024

Thanks to #19 and the v0.4.0 release, we now have universal wheels for 3.11 and 3.12. No idea why pypa/build doesn't build them for previous version, but that's a viable workaround now. As a reminder, pasteboard is basically unmaintained ( #18 ).

@tobywf tobywf closed this as completed Jan 15, 2024
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