Add some additional notes to `--index-url` docs (#8267)

This commit is contained in:
Charlie Marsh 2024-10-16 11:57:53 -07:00 committed by GitHub
parent 6ac5859b1a
commit b87a755225
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -162,8 +162,8 @@ In addition to the `[[tool.uv.index]]` configuration option, uv supports pip-sty
`--extra-index-url` command-line options for compatibility, where `--index-url` defines the default `--extra-index-url` command-line options for compatibility, where `--index-url` defines the default
index and `--extra-index-url` defines additional indexes. index and `--extra-index-url` defines additional indexes.
These options can be used in conjunction with the `[[tool.uv.index]]` configuration option, and use These options can be used in conjunction with the `[[tool.uv.index]]` configuration option, and
the same prioritization rules: follow the same prioritization rules:
- The default index is always treated as lowest priority, whether defined via the legacy - The default index is always treated as lowest priority, whether defined via the legacy
`--index-url` argument, the recommended `--default-index` argument, or a `[[tool.uv.index]]` entry `--index-url` argument, the recommended `--default-index` argument, or a `[[tool.uv.index]]` entry
@ -172,4 +172,5 @@ the same prioritization rules:
`--extra-index-url` argument, the recommended `--index` argument, or `[[tool.uv.index]]` entries. `--extra-index-url` argument, the recommended `--index` argument, or `[[tool.uv.index]]` entries.
In effect, `--index-url` and `--extra-index-url` can be thought of as unnamed `[[tool.uv.index]]` In effect, `--index-url` and `--extra-index-url` can be thought of as unnamed `[[tool.uv.index]]`
entries, with `default = true` enabled for the former. entries, with `default = true` enabled for the former. In that context, `--index-url` maps to
`--default-index`, and `--extra-index-url` maps to `--index`.