-
Notifications
You must be signed in to change notification settings - Fork 9
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
RFC 3: using a dependency solver #10
Comments
@ryanking13 Not necessarily, I think, if you have some priority between channels (--extra-index-url in pip pip option for instance) it should pick the version in the highest priority channel . |
Right now this is done in pyodide-build/create_pypa_index.py, so it can be used in |
Thanks! Absolutely. We cannot deploy HTML with the current CDN. |
Among RFC 1, 2, and 3, IMO this is the best option for the long-term. I mean, in the future, we hope people can upload the Emscripten wheels to PyPI or to other package indices, and then people can create a lock file from it. Then people who are okay with resolving dependencies dynamically can use Simple API (supported by micropip) to download packages from package indices, while people who make an application with fixed dependencies and don't want dependency resolution can create a lockfile. |
A Simple JSON API for this experimentation can be found in pyodide/pyodide#3979 |
@juntyr This could also be a useful direction to explore. The main part is, take an example list of requirements, some standard Python packaging tool (TBD), specify that the supported wheels are only of the form For instance, jazzband/pip-tools#585 was essentially this feature request, but they decided it's out of scope for pip-compile. Maybe @pradyunsg would also have some general advice or comments on this topic. |
This is what pyodide build does - using resolvelib. Incidentally, I do wonder how much this could be integrated into existing pyodide build functionality by making pyodide_build use this library to output a pyodide-lock.json. Or maybe just nick the logic from pypi.py in pyodide_build e.g. thinking about use cases
|
(with my PyPA hat on)
That's not entirely accurate, but is a rather complicated topic. That issue was closed automatically because of a linked documentation PR, while there are other issues centered around the same discussion, including mine. Here's a few comments I made there that might be of interest when we're talking about "lockfiles": jazzband/pip-tools#826 (comment) / jazzband/pip-tools#1326 (comment). Though, is it just a single platform in case of pyodide? FWIW it might be a good idea to participate in reviving PEP 665. |
Sure. Thanks for pointing that out. |
Here the idea is to use some standard Python dependency solver for creating the
pyodide-lock.json
from multiple sources (Pyodide distribution, PyPI, third party sources etc).For instance it could look as follows,
--extra-index-url
in pipemscripten*_wasm32
as the platform (or whatever it is now). Here the best tool remains to be determined,pyodide-lock.json
format (by taking information either from the originalpyodide-lock.json
)Alternative proposals in #8 #9
The text was updated successfully, but these errors were encountered: