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

Allow non-file:// paths to serve as --index-url values #4524

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

charliermarsh
Copy link
Member

Summary

pip allows these with the following logic:

if os.path.exists(location):  # Is a local path.
    url = path_to_url(location)
    path = location
elif location.startswith("file:"):  # A file: URL.
    url = location
    path = url_to_path(location)
elif is_url(location):
    url = location

Closes #4510.

Test Plan

cargo run pip install --index-url ../packse/index/simple-html/ example-a-961b4c22 --reinstall --no-cache --no-deps

@charliermarsh charliermarsh marked this pull request as ready for review June 25, 2024 17:23
@charliermarsh charliermarsh changed the title Allow non-file:// paths to serve as --index-url values Allow non-file:// paths to serve as --index-url values Jun 25, 2024
@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label Jun 25, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) June 25, 2024 17:33
@charliermarsh charliermarsh force-pushed the charlie/local-index branch 2 times, most recently from 0171f86 to 29b98ea Compare June 25, 2024 17:51
@charliermarsh charliermarsh merged commit e39f5f7 into main Jun 25, 2024
47 checks passed
@charliermarsh charliermarsh deleted the charlie/local-index branch June 25, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic on plugin installation from a local simple repository
1 participant