-
Notifications
You must be signed in to change notification settings - Fork 239
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
Pyodide Wheels #1002
Comments
The numpy.org webpage now has a pyodide-powered scientific stack in the browser. Wow. I have no idea ATM what is involved with building a pyodide wheel, and I'd assume there really aren't "platforms" for them, and I think a lot would likely be needed upstream to standardize tags and such, and cibuildwheel likely might not be the place to produce them, but I really have no idea. I don't even know if they are in traditional files. If it was something cibuildwheel could do, it would probably be a new "platform". |
You can see this mentioned in the roadmap here: https://pyodide.org/en/stable/project/roadmap.html pyodide/pyodide#655 & pyodide/pyodide#2027 are linked there. Both of which seem to be merged. |
I know, it's pretty cool!
Yeah, I was under the impression that they are already using wheels. This documentation seems to hint that you can create wheels: https://pyodide.org/en/stable/development/new-packages.html |
Yes, they do make wheels now. Looking into the process. I just found that page, actually. :) |
For the platform compatibility question see emscripten-core/emscripten#15917 |
Pretty sure there’s no way to load the a non pure wheel from anything but pyodide’s own build process at the moment. I was able to compile for it though locally (took a couple of hours to build CPython and all) |
If you build a compatible non-pure wheel in some other way, it's possible to load it with |
Maybe more feasible and makes more sense to implement, this is now beginning to be added as an official architecture in CPython: https://github.com/python/cpython/blob/main/Tools/wasm/README.md |
So @henryiii do you have any suggestions of how we can start working this? Thanks to @hoodmane work out-of-tree builds are starting to looks reasonably good (example in numpy/numpy#21895 where the test runner is also going to be shipped by Pyodide soon). So how do we move forward on this? From what I can tell for simple packages, right now the constraints are,
Should we try to make it work with just 1 CI provider to start: say GH Actions? |
I've been pretty busy, and just started teaching a class at Princeton this week, too. In a couple of weeks or so the course should settle down to a rhythm (also have PyHEP next week). I'm also just getting started on my (funded!) Scikit-build project. So my time is currently minimal, but should improve later.
I'd work on GHA first, then we can see if we can start adding more - we have a table for what systems support what. It shouldn't be too specific, so should be easy to expand. One question: as CPython starts getting better support & built binaries, how will Pyodide integrate? One thing users will likely want is to be able to use an "official" release (once it hits tier 2, anyway). Is there some sort of setting we should include, or will it be multiple platforms, or will pyodide and CPython be compatible after 3.11? (I'd guess the main issue would be the Emscripten version matching?) |
Indeed, we don't seem to need it. As long we have a linux OS with appropriate versions of Emscripten, node, and python that should be sufficient. I haven't yet tried to build in very sparse docker containers to determine the exact requirements, but that would probably be a useful exercise. But it works on my host machine and on the default github actions ubuntu. Certainly most of the pyodide-env container is not needed.
There is good hope that these will eventually be quite simple. Generally it's necessary to skip a few tests that use e.g., subprocess or threads. If it seems worthwhile we could probably even get subprocess working in the test runner (but not threads)
For now all JavaScript needs to be statically linked and our code to load packages, load the runtime, and set up the foreign function interface is all JavaScript. We can look into side loading these eventually, but I think it will be technically difficult. Of course there is also the Emscripten version matching issue as always. |
Thanks for the update and the pointers! It's was just to get some idea of the next steps, and it's more clear now. |
Description
I'm not sure if this is out of the scope of this project, but the ability to build Pyodide wheels would be wonderful: https://pyodide.org/en/stable/development/new-packages.html
Build log
No response
CI config
No response
The text was updated successfully, but these errors were encountered: