Skip to content
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

use special values for Install from PyPI/Lock file in install(... index_url)/ Transaction. #147

Open
Carreau opened this issue Oct 22, 2024 · 3 comments

Comments

@Carreau
Copy link
Contributor

Carreau commented Oct 22, 2024

from an high level API point of view, I think we could/should treat the pyodide_lock like another index, and when experimenting with proxy, I'd love to be able to explicitley remove the lock as a fallback.

I'm thinking we could assign a specific value say "LOCK" for an index URL and treat that a "look into the lock file".

This would allow things like

await micropip.install('whatever', index_url=['https://anaconda.org/alt_index', 'LOCK'])

or

# I want to make sure to install from PyPI.
await micropip.install('whatever', index_url=['https://pypi.org/simple'])

Along this vein, I think if we see the value 'PYPI', we could replace with "https://pypi.org/simple"

Thoughts @agriyakhetarpal ?

@agriyakhetarpal
Copy link
Member

Thanks for opening this before I did, @Carreau! I agree with this approach. It would be quite useful to provide an alias for PyPI and a lockfile.

piplite in JupyterLite seems to offer some additional features (https://jupyterlite.readthedocs.io/en/stable/howto/pyodide/packages.html) such as disabling PyPI fallback through the JSON file, I don't know if the opposite (i.e., what you suggest) is possible to do there?

@ryanking13
Copy link
Member

Sounds good to me.

How about PYODIDE_LOCK or just PYODIDE instead of LOCK? I think the word LOCK isn't that straightforward (some users don't actually need to know about the lockfile).

@Carreau
Copy link
Contributor Author

Carreau commented Nov 4, 2024

Yeah, I don't have any particular thoughts on the name, just that a sentinel value would I think be useful/helpfull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants