-
-
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
Options to fix dependencies of manually loaded packages #79
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 @joemarshall. I made some nitpicky comments.
…nto fix_dependencies
I refactored it so fix_package_dependencies lives in _utils and got rid of the public facing function which wasn't really useful except in conjuction with freeze anyway. |
for more information, see https://pre-commit.ci
…ropip into fix_dependencies
Oh and fixed / added tests for freeze. |
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 @joemarshall!
I have some minor comments otherwise LGTM.
Could you please update the changelog? I think we can use a version 0.4.1 and release with this PR.
Okay, I think I've done those changes okay now |
for more information, see https://pre-commit.ci
…ropip into fix_dependencies
for more information, see https://pre-commit.ci
Thanks @joemarshall! Pyodide 0.24.0 has already been released, so I think this would be included in 0.24.1 |
Oh wait this is a micropip change, not sure if these labels make sense. |
Right now, if you import packages from wheel files without automatically getting dependencies,
micropip.freeze
won't correctly show dependencies for the packages.This patch fixes up dependencies for manually loaded wheels, adding a method
micropip.check_package_dependencies
to check and fix dependencies for a package.It also uses the same function to make
micropip.freeze
work even if you just manually load a wheel and all dependencies.Still not sure whether this would be better in pyodide-lock, but I think given
micropip.freeze
exists, this patch that makes it work in this case seems reasonably sensible.