-
Notifications
You must be signed in to change notification settings - Fork 27
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
Nightly wheels and WASM/pyodide builds #234
Comments
Thanks for the mention, @oscarbenjamin! I'll be on holiday until early November, so I'm happy to step back and let someone else take it if you wish and if this is pressing for any reason. Otherwise, I can take a look at this in the coming weeks. I'd suggest not using |
I wasn't suggesting that you do the work here (although you are welcome to!). Rather any advice is welcome:
Okay, good to know. Do you know of any example of any similar project that has a CI workflow I could look at? The task here is to build three dependent C libraries (GMP, MPFR and FLINT) that all build with autotools and then build the python-flint Python package on top. I'm not sure I understand how this works in pyodide but the other wheels all need to bundle those C dependencies in which is done by cibuildwheel's repair step (auditwheel, delvewheel, delocate). I don't know if it matters but on current main python-flint uses meson-python which is different from the most recent release (which uses setuptools).
The cibuildwheel integration would be more useful if we could treat the wheels like the others which we can't if we can't upload them to PyPI or if the build and setup steps are quite different. I guess in future using cibuildwheel will make more sense. |
Thank you! I wasn't too sure about it because you pinged me here, so I'll help out wherever I can. :D
I'd say that there is indeed a lack of documentation around navigating build systems with cross-compilation using Pyodide. Perhaps we need to publish more example packages across various build backends in a repository somewhere (this exists for just As for repairing the WASM wheel, we ship a tool called I just wanted to clarify, though—for the C libraries you mentioned: GMP, MPFR and FLINT—will they be used during You could look at NumPy's CI workflow for a project that uses
I agree! |
It is both. We need the headers at build time and then we need the shared libraries at runtime. There are no Python packages for GMP, MPFR and FLINT apart from python-flint itself which uses all of them (and needs to include all three bundled in to the wheel). The wheel build process is basically:
I will try this out locally when I get time with |
I understand now, thanks for the context! When I get the time, I'll be glad to help out more, too, and I will try my best to answer any questions. |
Uploading nightly wheels was added in gh-235. Now if we add a WASM build in CI we can add it to the upload job. |
CC @agriyakhetarpal
See also:
scientific-python/upload-nightly-action#111
We should upload nightly wheels after each merge to main to the scientific-python nightly wheels index:
https://anaconda.org/scientific-python-nightly-wheels
That is useful for downstream testing e.g. in SymPy. It would also make it possible to have the latest main branches of python-flint and SymPy available for testing in SymPy Live:
https://live.sympy.org/
We should also build and test python-flint in WASM with pyodide in CI. There already are WASM builds of python-flint in pyodide:
https://pyodide.org/en/stable/usage/packages-in-pyodide.html
Those can be used in the browser e.g. at:
https://pyodide.org/en/stable/console.html
It looks like cibuildwheel could build these with
--platform pyodide
:https://cibuildwheel.pypa.io/en/stable/options/
We would first need emscripten builds of GMP, MPFR and FLINT. The build recipes for those can be found in the pyodide repo e.g.:
https://github.com/pyodide/pyodide/tree/main/packages/flint
Probably a separate CI workflow should be used for making and testing pyodide wheels because we can't upload them to PyPI and the build commands and CI setup would be a bit different. We can upload the WASM wheels to the nightly wheels index though and the final release versions are already built in pyodide.
The text was updated successfully, but these errors were encountered: