Add support for Simple Repository API (PEP 503 / PEP 691) - #75
Conversation
rth
left a comment
There was a problem hiding this comment.
Very nice, thanks @ryanking13 ! I have only one minor comment otherwise LGTM.
I think once this is merged we should do a micropip release with it. Unless there were other PRs you wanted to do in this area.
| from .externals.mousebender.simple import from_project_details_html | ||
|
|
||
| DEFAULT_INDEX_URLS = ["https://pypi.org/pypi/{package_name}/json"] | ||
| DEFAULT_INDEX_URLS = ["https://pypi.org/simple"] |
There was a problem hiding this comment.
Can you confirm we are never actually downloading the top level index here, because it's >3MB compressed in the case of PyPI.
There was a problem hiding this comment.
Yes, I can confirm that we are not downloading the top level index, unless someone changes the index URL to https://pypi.org and do micropip.install("simple") :)
Yes, let's make a release so we can include it in Pyodide 0.24. |
This adds support for Simple Repository API including PEP 691 and PEP 503.
This PR also changes the default index URL from
https://pypi.org/pypi/{package_name}/jsontohttps://pypi.org/simple.I added some tests that send requests to remote package indexes like PyPI, so we can ensure that micropip "works" with famous package indexes. Those tests don't run by default in CI, but one can run them manually by adding
--remote-remote-index-testsflag or by clicking the button in GHA.