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

Uploading emscripten wheels to pypi fails #96

Closed
kafonek opened this issue Nov 28, 2022 · 10 comments · Fixed by #99
Closed

Uploading emscripten wheels to pypi fails #96

kafonek opened this issue Nov 28, 2022 · 10 comments · Fixed by #99

Comments

@kafonek
Copy link
Contributor

kafonek commented Nov 28, 2022

Nooo! https://github.com/y-crdt/ypy/actions/runs/3566940726/jobs/5994217644

I did not see this coming. Apologies, I should have tried to upload an emscripten wheel to test pypi on another project. Looks like pypi/warehouse#10416 is relevant.

I'll revert the wasm build in ci/cd later today if someone else doesn't get to it first.

ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/        
         Binary wheel 'y_py-0.5.5-cp310-cp310-emscripten_3_1_14_wasm32.whl' has 
         an unsupported platform tag 'emscripten_3_1_14_wasm32'.                
Error: Process completed with exit code 1.
@Waidhoferj
Copy link
Collaborator

Thanks @kafonek!

This was referenced Nov 28, 2022
@kafonek
Copy link
Contributor Author

kafonek commented Nov 28, 2022

@Waidhoferj how do you feel about hosting the emscripten wheel as an asset on the y-py release? I've put together a prototype of that over in py-rust-fib. Bit janky that we can't micropip.install right from the github release download link (CORS) but any kind of CORS proxy can get around that as a temporary solution until emscripten wheels can be hosted on pypi.

https://github.com/kafonek/py-rust-fib/releases/tag/second-release has an example of a Python/Rust emscripten wheel attached as an asset. I used https://github.com/softprops/action-gh-release to create the release as a CI action triggered by a tag, but we could also manually attach an emscripten wheel as an asset when creating the release if you do that via the UI right now.

image

@Waidhoferj
Copy link
Collaborator

@kafonek This is a good fix given the choices we have. Would you be able to alter the wasm path of the wheels action to attach the wheel to the Ypy release?

@kafonek
Copy link
Contributor Author

kafonek commented Nov 29, 2022

Yep I think https://github.com/softprops/action-gh-release fits the workflow in this repo. I'll tweak py-rust-fib to match this structure and try it out, then put up a PR. I'll build the emscripten / wasm wheel into a different directory than dist and upload the artifact to a different name than wheels.

@kafonek
Copy link
Contributor Author

kafonek commented Nov 29, 2022

@Waidhoferj
Copy link
Collaborator

This looks great! Thanks for troubleshooting!

@kafonek
Copy link
Contributor Author

kafonek commented Nov 29, 2022

Quick update, think I've got the ci actions working but I'll need to tweak the dependencies in pyproject.toml to make maturin an optional dependency, since there's no pure Python wheel for that library.

image

@Waidhoferj
Copy link
Collaborator

That makes sense. Maturin is a dev dependency and totally unnecessary for library users

@kafonek
Copy link
Contributor Author

kafonek commented Nov 29, 2022

Love to see it. Just need to clean up the branch and touch up docs, then I'll put the PR up here.

image

@Waidhoferj
Copy link
Collaborator

Wow exiting to see it running!

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 a pull request may close this issue.

2 participants