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

Add index URLs when provided via uv add --index or --default-index #7746

Open
wants to merge 1 commit into
base: charlie/index-api-environment-vars
Choose a base branch
from

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Sep 27, 2024

Summary

The behavior is as follows:

  • If you provide --index or --default-index on the command-line, we add those indexes to the pyproject.toml (with names, if provided, as in --index pytorch=https://download.pytorch.org/whl/cu121.
  • If you provide --index-url or --default-index, we warn, but don't add the indexes to the file. (This seems wrong -- why not add them?)
  • If you provide an index with a name or URL that already exists, we remove that entry, and add the new index to the top of the list (since it now has highest priority).
  • If you provide a --default-index, and an index already has default = true, we remove that entry, since it won't be used anymore.

We do not pin packages to specific indexes yet.

@charliermarsh charliermarsh marked this pull request as ready for review September 27, 2024 19:18
@charliermarsh charliermarsh added enhancement New feature or request cli Related to the command line interface labels Sep 27, 2024
@charliermarsh charliermarsh force-pushed the charlie/index-api-environment-vars branch from 3c4c842 to cd3ae91 Compare September 28, 2024 19:03
@charliermarsh charliermarsh force-pushed the charlie/index-api-environment-vars branch from cd3ae91 to e90683c Compare September 28, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant