You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I started using panel and would like to deploy something with their pyodide-export. As I don't want to rely on the various CDNs, I want to get all the wheels to host them myself. As there doesn't seem to be a canonical requirements-resolver in the python world (...) and pyodide-packages are not yet integrated with Pypi, I think this would eventually result in replicating micropip functionality.
I gather this is essentially what micropip.freeze does - solving this would thus also solve these problems I'd gather #68#78. I think pyodide-pack does this too - but it uses Javascript. Or is it pyodide-lock?
So: would you be open to make micropip
a) importable in any python, so that
b) you can just run the (primitive, but better than replicated...) resolver in python to spit out a dict of wheels?
c) any ideas how to start? The things which are confusing me a lot: where are the pyodide-CDN-locations injected?, which are these? where is this documented?
Hosting packages is not very hard. You can download all wheels in the Pyodide distribution, host it somewhere (that supports https://peps.python.org/pep-0691/), and update the index URL used in micropip (micropip.set_index_urls)
The tricky parts are optimizing the dependency resolution. I think pyodide-lock should be able to create a lockfile from scratch, but for now in only supports adding wheels into the existing lockfile. So users need to manually modify the URLs in the lockfile.
So I think there are a number of features that could be put into pyodide-lock to improve this, but I'm not sure what would satisfy everyone. And in the long term, I think a lot will change when it becomes possible to upload WASM packages to package indexes like PyPI.
any ideas how to start?
I think we can start with connecting micropip and pyodide-lock, so that micropip.freeze can create a pyodide-lock compatible lockfile (It may work, but we don't have tests).
Then maybe we can add more features in pyodide-lock for modifying lockfiles, so that, for example, making CDN locations can be changed.
So, I started using
panel
and would like to deploy something with their pyodide-export. As I don't want to rely on the various CDNs, I want to get all the wheels to host them myself. As there doesn't seem to be a canonical requirements-resolver in the python world (...) and pyodide-packages are not yet integrated with Pypi, I think this would eventually result in replicating micropip functionality.I gather this is essentially what micropip.freeze does - solving this would thus also solve these problems I'd gather #68 #78. I think pyodide-pack does this too - but it uses Javascript. Or is it pyodide-lock?
So: would you be open to make micropip
a) importable in any python, so that
b) you can just run the (primitive, but better than replicated...) resolver in python to spit out a dict of wheels?
c) any ideas how to start? The things which are confusing me a lot: where are the pyodide-CDN-locations injected?, which are these? where is this documented?
So, looking into pyodide-lock, people are open to this solution: pyodide/pyodide-lock#8
The text was updated successfully, but these errors were encountered: