-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix micropip.install to search shared libraries inside the wheel correctly #97
Conversation
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.
Thanks @ryanking13! Could you add a changelog entry?
name = parse_wheel_filename(path.name)[0] | ||
url = self._register_handler(path) | ||
|
||
if name in self._wheels and not replace: | ||
return |
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.
Maybe we should raise here? I think silently doing nothing is likely to be confusing.
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 used this method to register all the wheels included in the Pyodide distribution as test wheels, as without this, they would conflict with pytest wheel, etc that I put in for testing.
I think it will be fine as long as we know what we are doing. I added some comments about it.
Oh, I forgot to update the changelog... |
Previously, micropip was not able to locate shared libraries in the
.libs
directory of the wheel.For instance, in Pyodide 0.25.0,
works, while
does not work.
This is because
micropip.install
does not search the path thatpyodide.loadPackage
looks for.This PR fixes it by using the same API
pyodide.loadPackage
is using when loading shared libraries.