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

Provide Python wheels #60

Open
BSchilperoort opened this issue Dec 11, 2024 · 3 comments
Open

Provide Python wheels #60

BSchilperoort opened this issue Dec 11, 2024 · 3 comments

Comments

@BSchilperoort
Copy link
Contributor

I tried using bmipy for a teachbooks BMI "toybox". However, micropip can only install packages with pure python wheels, but only the source tarball is available for bmipy.

Apart from enabling easy installation in WASM Python, having wheels available has more benefits:

  1. Faster installation for pure Python packages.
  2. Avoids arbitrary code execution for installation. (Avoids setup.py)
  3. Allows better caching for testing and continuous integration.
  4. Creates .pyc files as part of installation to ensure they match the Python interpreter used.
  5. More consistent installs across platforms and machines.

(source: https://pythonwheels.com/)


To create both a tarball and wheel, the command following command suffices:

> python -m build 
...
Successfully built bmipy-2.0.2.dev0.tar.gz and bmipy-2.0.2.dev0-py3-none-any.whl
@BSchilperoort
Copy link
Contributor Author

Note that this should not require a new release: It is possible to publish new artifacts that are more specific for a given release.

@mdpiper
Copy link
Member

mdpiper commented Dec 17, 2024

@mcflugen has set up a job in the Landlab CI to build wheels. Perhaps this could be adapted for use here?

@mcflugen
Copy link
Member

Yup, this would be easy to do. In fact, we already have a nox session that builds wheels (nox -s build).

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

3 participants