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

allow micropip to install pyodide wheels #1225

Closed
wants to merge 9 commits into from

Conversation

reynoldsnlp
Copy link

Currently, briefcase tries to load compiled wheels from the host platform, which leads to errors when loading in the browser. This PR parses the whl filename and any wheels that are not pure python or wasm32 are replaced with simply the package name, so that micropip can install it. We do not attempt to bundle the whl file compiled for the host platform.

In the future, when Pyodide starts hosting an index, we should download the pyodide wheel and bundle that wheel.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16
Copy link
Member

I think this may be related:

@reynoldsnlp
Copy link
Author

@rmartin16 Yes, #1104 and #1227 should both be linked to this PR so they close upon merge.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see what you're doing here, and it's clever... a little bit too clever :-) We're downloading a platform wheel, then using the existence of a platform wheel to determine whether the wheel reference should be ignored. This will work, but it's going to result in a lot of unused files in the static folder; and potentially inconsistencies in package versions (since the version request in the requires list will be ignored in the resolution to pyscript).

I think I'd prefer to see this addressed at the original installation phase, rather than the "use" phase. In the simplest approach, the list of packages published by Pyodide is known, so we can filter what is pip installed (and that what wheels exist on disk); alternatively, we can potentially self-host copies of the pyodide wheels on a private index; better still would be to convince Pyodide to publish a simple index of their packages.

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 this pull request may close these issues.

3 participants