-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversation
I think this may be related: |
@rmartin16 Yes, #1104 and #1227 should both be linked to this PR so they close upon merge. |
There was a problem hiding this 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.
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: