-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feature: Dependency fixup for manually installed wheels #78
Comments
Thanks @joemarshall! I think we are discussing similar stuff in |
I think this idea makes sense. |
I sketched out a fix (#79) to micropip.freeze so it fixes up the dependencies between packages which are newly imported. This means that you can:
It doesn't really do any dependency resolution (that happens offline in pyodide build) - it just looks at the list of packages in the wheel dependencies and compares against the frozen package list - if any of the wheel dependencies are in there, it adds them to the dependency list for that package. I'm not sure whether or not |
I'm building a package which has a large dependency tree. So I build it with pyodide build including dependencies, and get myself all the wheels (18 wheels, plus some pyodide dependencies). Then I script micropip to load all the wheels (with deps turned off because I've manually calculated them already) and call freeze to get a new JSON file.
So far so good. But the JSON file has no dependencies in it, and I have half an hour's work to manually edit every package and add in dependencies.
I guess I want some way that after loading a bunch of wheels I can call
micropip.check_package_dependencies("package")
and it will check and fix the dependencies. It could also report missing deps.In theory I can use micropip.install in reverse order (starting from leaf nodes of the dependency tree) and leave dependency resolution on, but I'm a bit worried this will be fragile. I'd rather be able to just chuck all my wheels at it and then fix the dependencies.
Does this idea make sense?
The text was updated successfully, but these errors were encountered: