From 7dfb80485b1cb50b47d52b22b215b1da75a43f0f Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 26 Sep 2024 21:01:59 -0400 Subject: [PATCH] Rename --- .../src/{index_source.rs => index.rs} | 12 ++++---- crates/distribution-types/src/index_url.rs | 14 ++++----- crates/distribution-types/src/lib.rs | 4 +-- crates/uv-cli/src/lib.rs | 24 +++++++-------- .../uv-distribution/src/metadata/lowering.rs | 20 +++++-------- crates/uv-scripts/src/lib.rs | 4 +-- crates/uv-settings/src/settings.rs | 14 ++++----- crates/uv-workspace/src/pyproject.rs | 4 +-- crates/uv-workspace/src/workspace.rs | 6 ++-- crates/uv/src/commands/pip/compile.rs | 8 ++--- crates/uv/src/commands/pip/install.rs | 6 ++-- crates/uv/src/commands/pip/sync.rs | 6 ++-- crates/uv/src/settings.rs | 18 +++++------ docs/reference/cli.md | 30 +++++++++---------- docs/reference/settings.md | 2 +- 15 files changed, 82 insertions(+), 90 deletions(-) rename crates/distribution-types/src/{index_source.rs => index.rs} (93%) diff --git a/crates/distribution-types/src/index_source.rs b/crates/distribution-types/src/index.rs similarity index 93% rename from crates/distribution-types/src/index_source.rs rename to crates/distribution-types/src/index.rs index 9c3da94f8919..9a0ac31e95dc 100644 --- a/crates/distribution-types/src/index_source.rs +++ b/crates/distribution-types/src/index.rs @@ -5,7 +5,7 @@ use crate::{IndexUrl, IndexUrlError}; #[derive(Debug, Clone, Hash, Eq, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct IndexSource { +pub struct Index { /// The name of the index. /// /// Index names can be used to reference indexes elsewhere in the configuration. For example, @@ -72,8 +72,8 @@ pub struct IndexSource { // Flat, // } -impl IndexSource { - /// Initialize an [`IndexSource`] from a pip-style `--index-url`. +impl Index { + /// Initialize an [`Index`] from a pip-style `--index-url`. pub fn from_index_url(url: IndexUrl) -> Self { Self { url, @@ -83,7 +83,7 @@ impl IndexSource { } } - /// Initialize an [`IndexSource`] from a pip-style `--extra-index-url`. + /// Initialize an [`Index`] from a pip-style `--extra-index-url`. pub fn from_extra_index_url(url: IndexUrl) -> Self { Self { url, @@ -94,7 +94,7 @@ impl IndexSource { } } -impl FromStr for IndexSource { +impl FromStr for Index { type Err = IndexSourceError; fn from_str(s: &str) -> Result { @@ -126,7 +126,7 @@ impl FromStr for IndexSource { } } -/// An error that can occur when parsing an [`IndexSource`]. +/// An error that can occur when parsing an [`Index`]. #[derive(Error, Debug)] pub enum IndexSourceError { #[error(transparent)] diff --git a/crates/distribution-types/src/index_url.rs b/crates/distribution-types/src/index_url.rs index cd7749a1238b..3a9ceda12d4f 100644 --- a/crates/distribution-types/src/index_url.rs +++ b/crates/distribution-types/src/index_url.rs @@ -11,7 +11,7 @@ use url::{ParseError, Url}; use pep508_rs::{VerbatimUrl, VerbatimUrlError}; -use crate::{IndexSource, Verbatim}; +use crate::{Index, Verbatim}; static PYPI_URL: LazyLock = LazyLock::new(|| Url::parse("https://pypi.org/simple").unwrap()); @@ -300,18 +300,14 @@ impl From for FlatIndexLocation { #[derive(Default, Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct IndexLocations { - indexes: Vec, + indexes: Vec, flat_index: Vec, no_index: bool, } impl IndexLocations { /// Determine the index URLs to use for fetching packages. - pub fn new( - indexes: Vec, - flat_index: Vec, - no_index: bool, - ) -> Self { + pub fn new(indexes: Vec, flat_index: Vec, no_index: bool) -> Self { Self { indexes, flat_index, @@ -328,7 +324,7 @@ impl IndexLocations { #[must_use] pub fn combine( self, - indexes: Vec, + indexes: Vec, flat_index: Vec, no_index: bool, ) -> Self { @@ -425,7 +421,7 @@ impl<'a> IndexLocations { /// From a pip perspective, this type merges `--index-url` and `--extra-index-url`. #[derive(Default, Debug, Clone, PartialEq, Eq)] pub struct IndexUrls { - indexes: Vec, + indexes: Vec, no_index: bool, } diff --git a/crates/distribution-types/src/lib.rs b/crates/distribution-types/src/lib.rs index 0d7c07cf716b..c5f3abddcd1c 100644 --- a/crates/distribution-types/src/lib.rs +++ b/crates/distribution-types/src/lib.rs @@ -57,7 +57,7 @@ pub use crate::error::*; pub use crate::file::*; pub use crate::hash::*; pub use crate::id::*; -pub use crate::index_source::*; +pub use crate::index::*; pub use crate::index_url::*; pub use crate::installed::*; pub use crate::prioritized_distribution::*; @@ -76,7 +76,7 @@ mod error; mod file; mod hash; mod id; -mod index_source; +mod index; mod index_url; mod installed; mod prioritized_distribution; diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 2f380b7317a8..5d70c823a88f 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -7,7 +7,7 @@ use anyhow::{anyhow, Result}; use clap::builder::styling::{AnsiColor, Effects, Style}; use clap::builder::Styles; use clap::{Args, Parser, Subcommand}; -use distribution_types::{FlatIndexLocation, IndexSource, IndexUrl}; +use distribution_types::{FlatIndexLocation, Index, IndexUrl}; use pep508_rs::Requirement; use pypi_types::VerbatimParsedUrl; use url::Url; @@ -779,13 +779,13 @@ fn parse_index_url(input: &str) -> Result, String> { } } -/// Parse a string into an [`IndexSource`], mapping the empty string to `None`. -fn parse_index_source(input: &str) -> Result, String> { +/// Parse a string into an [`Index`], mapping the empty string to `None`. +fn parse_index_source(input: &str) -> Result, String> { if input.is_empty() { Ok(Maybe::None) } else { - match IndexSource::from_str(input) { - Ok(index) => Ok(Maybe::Some(IndexSource { + match Index::from_str(input) { + Ok(index) => Ok(Maybe::Some(Index { default: false, ..index })), @@ -794,13 +794,13 @@ fn parse_index_source(input: &str) -> Result, String> { } } -/// Parse a string into an [`IndexSource`], mapping the empty string to `None`. -fn parse_default_index_source(input: &str) -> Result, String> { +/// Parse a string into an [`Index`], mapping the empty string to `None`. +fn parse_default_index_source(input: &str) -> Result, String> { if input.is_empty() { Ok(Maybe::None) } else { - match IndexSource::from_str(input) { - Ok(index) => Ok(Maybe::Some(IndexSource { + match Index::from_str(input) { + Ok(index) => Ok(Maybe::Some(Index { default: true, ..index })), @@ -3702,7 +3702,7 @@ pub struct GenerateShellCompletionArgs { #[derive(Args)] #[allow(clippy::struct_excessive_bools)] pub struct IndexArgs { - /// The URLs of packages indexes to use when resolving dependencies. + /// The URLs to use when resolving dependencies, in addition to the default index. /// /// Accepts either a repository compliant with PEP 503 (the simple repository API), or a local /// directory laid out in the same format. @@ -3711,7 +3711,7 @@ pub struct IndexArgs { /// `--default-index` (which defaults to PyPI). When multiple `--index` flags are /// provided, earlier values take priority. #[arg(long, env = "UV_INDEX", value_delimiter = ' ', value_parser = parse_index_source, help_heading = "Index options")] - pub index: Option>>, + pub index: Option>>, /// The URL of the default package index (by default: ). /// @@ -3721,7 +3721,7 @@ pub struct IndexArgs { /// The index given by this flag is given lower priority than all other indexes specified via /// the `--index` flag. #[arg(long, env = "UV_DEFAULT_INDEX", value_parser = parse_default_index_source, help_heading = "Index options")] - pub default_index: Option>, + pub default_index: Option>, /// The URL of the Python package index (by default: ). /// diff --git a/crates/uv-distribution/src/metadata/lowering.rs b/crates/uv-distribution/src/metadata/lowering.rs index ecbfc3eec2e4..4d7fa401ea67 100644 --- a/crates/uv-distribution/src/metadata/lowering.rs +++ b/crates/uv-distribution/src/metadata/lowering.rs @@ -6,7 +6,7 @@ use thiserror::Error; use url::Url; use distribution_filename::DistExtension; -use distribution_types::IndexSource; +use distribution_types::Index; use pep440_rs::VersionSpecifiers; use pep508_rs::{VerbatimUrl, VersionOrUrl}; use pypi_types::{ParsedUrlError, Requirement, RequirementSource, VerbatimParsedUrl}; @@ -34,7 +34,7 @@ impl LoweredRequirement { project_name: &PackageName, project_dir: &Path, project_sources: &BTreeMap, - project_indexes: &[IndexSource], + project_indexes: &[Index], workspace: &Workspace, ) -> Result { let (source, origin) = if let Some(source) = project_sources.get(&requirement.name) { @@ -115,15 +115,13 @@ impl LoweredRequirement { // in that order. let Some(index) = project_indexes .iter() - .find(|IndexSource { name, .. }| { - name.as_ref().is_some_and(|name| *name == index) - }) + .find(|Index { name, .. }| name.as_ref().is_some_and(|name| *name == index)) .or_else(|| { - workspace.indexes().iter().find(|IndexSource { name, .. }| { + workspace.indexes().iter().find(|Index { name, .. }| { name.as_ref().is_some_and(|name| *name == index) }) }) - .map(|IndexSource { url: index, .. }| index.clone()) + .map(|Index { url: index, .. }| index.clone()) else { return Err(LoweringError::MissingIndex(requirement.name, index)); }; @@ -205,7 +203,7 @@ impl LoweredRequirement { requirement: pep508_rs::Requirement, dir: &Path, sources: &BTreeMap, - indexes: &[IndexSource], + indexes: &[Index], ) -> Result { let source = sources.get(&requirement.name).cloned(); @@ -247,10 +245,8 @@ impl LoweredRequirement { Source::Registry { index } => { let Some(index) = indexes .iter() - .find(|IndexSource { name, .. }| { - name.as_ref().is_some_and(|name| *name == index) - }) - .map(|IndexSource { url: index, .. }| index.clone()) + .find(|Index { name, .. }| name.as_ref().is_some_and(|name| *name == index)) + .map(|Index { url: index, .. }| index.clone()) else { return Err(LoweringError::MissingIndex(requirement.name, index)); }; diff --git a/crates/uv-scripts/src/lib.rs b/crates/uv-scripts/src/lib.rs index 537ef1cbc998..2ca7fd4773eb 100644 --- a/crates/uv-scripts/src/lib.rs +++ b/crates/uv-scripts/src/lib.rs @@ -4,7 +4,7 @@ use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::LazyLock; -use distribution_types::IndexSource; +use distribution_types::Index; use memchr::memmem::Finder; use pep440_rs::VersionSpecifiers; use pep508_rs::PackageName; @@ -194,7 +194,7 @@ pub struct ToolUv { #[serde(flatten)] pub top_level: ResolverInstallerOptions, pub sources: Option>, - pub indexes: Option>, + pub indexes: Option>, } #[derive(Debug, Error)] diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index 5cbbf80c97e2..e2053674cb1e 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -1,6 +1,6 @@ use std::{fmt::Debug, num::NonZeroUsize, path::PathBuf}; -use distribution_types::{FlatIndexLocation, IndexSource, IndexUrl, StaticMetadata}; +use distribution_types::{FlatIndexLocation, Index, IndexUrl, StaticMetadata}; use install_wheel_rs::linker::LinkMode; use pep508_rs::Requirement; use pypi_types::{SupportedEnvironments, VerbatimParsedUrl}; @@ -234,7 +234,7 @@ pub struct GlobalOptions { #[serde(rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct InstallerOptions { - pub index: Option>, + pub index: Option>, pub index_url: Option, pub extra_index_url: Option>, pub no_index: Option, @@ -262,7 +262,7 @@ pub struct InstallerOptions { #[serde(rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct ResolverOptions { - pub index: Option>, + pub index: Option>, pub index_url: Option, pub extra_index_url: Option>, pub no_index: Option, @@ -329,7 +329,7 @@ pub struct ResolverInstallerOptions { url = "https://download.pytorch.org/whl/cu121" "# )] - pub index: Option>, + pub index: Option>, /// The URL of the Python package index (by default: ). /// /// Accepts either a repository compliant with [PEP 503](https://peps.python.org/pep-0503/) @@ -773,7 +773,7 @@ pub struct PipOptions { /// Additionally, marking an index as default will disable the PyPI default index. #[serde(skip)] #[cfg_attr(feature = "schemars", schemars(skip))] - pub index: Option>, + pub index: Option>, /// The URL of the Python package index (by default: ). /// /// Accepts either a repository compliant with [PEP 503](https://peps.python.org/pep-0503/) @@ -1444,7 +1444,7 @@ impl From for InstallerOptions { #[serde(deny_unknown_fields, rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct ToolOptions { - pub index: Option>, + pub index: Option>, pub index_url: Option, pub extra_index_url: Option>, pub no_index: Option, @@ -1550,7 +1550,7 @@ pub struct OptionsWire { // #[serde(flatten)] // top_level: ResolverInstallerOptions, - index: Option>, + index: Option>, index_url: Option, extra_index_url: Option>, no_index: Option, diff --git a/crates/uv-workspace/src/pyproject.rs b/crates/uv-workspace/src/pyproject.rs index 3ce3a92e9b9a..724f50dc668c 100644 --- a/crates/uv-workspace/src/pyproject.rs +++ b/crates/uv-workspace/src/pyproject.rs @@ -6,7 +6,7 @@ //! //! Then lowers them into a dependency specification. -use distribution_types::IndexSource; +use distribution_types::Index; use glob::Pattern; use pep440_rs::{Version, VersionSpecifiers}; use pypi_types::{RequirementSource, SupportedEnvironments, VerbatimParsedUrl}; @@ -189,7 +189,7 @@ pub struct ToolUv { url = "https://download.pytorch.org/whl/cu121" "# )] - pub index: Option>, + pub index: Option>, /// The workspace definition for the project, if any. #[option_group] diff --git a/crates/uv-workspace/src/workspace.rs b/crates/uv-workspace/src/workspace.rs index abbadc12abfa..0f15ea312927 100644 --- a/crates/uv-workspace/src/workspace.rs +++ b/crates/uv-workspace/src/workspace.rs @@ -1,6 +1,6 @@ //! Resolve the current [`ProjectWorkspace`] or [`Workspace`]. -use distribution_types::IndexSource; +use distribution_types::Index; use either::Either; use glob::{glob, GlobError, PatternError}; use pep508_rs::{MarkerTree, RequirementOrigin, VerbatimUrl}; @@ -82,7 +82,7 @@ pub struct Workspace { /// The index table from the workspace `pyproject.toml`. /// /// This table is overridden by the project indexes. - indexes: Vec, + indexes: Vec, /// The `pyproject.toml` of the workspace root. pyproject_toml: PyProjectToml, } @@ -536,7 +536,7 @@ impl Workspace { } /// The index table from the workspace `pyproject.toml`. - pub fn indexes(&self) -> &[IndexSource] { + pub fn indexes(&self) -> &[Index] { &self.indexes } diff --git a/crates/uv/src/commands/pip/compile.rs b/crates/uv/src/commands/pip/compile.rs index ea158b01aae1..fb8ab1986229 100644 --- a/crates/uv/src/commands/pip/compile.rs +++ b/crates/uv/src/commands/pip/compile.rs @@ -8,8 +8,8 @@ use owo_colors::OwoColorize; use tracing::debug; use distribution_types::{ - DependencyMetadata, IndexCapabilities, IndexLocations, IndexSource, - NameRequirementSpecification, UnresolvedRequirementSpecification, Verbatim, + DependencyMetadata, Index, IndexCapabilities, IndexLocations, NameRequirementSpecification, + UnresolvedRequirementSpecification, Verbatim, }; use install_wheel_rs::linker::LinkMode; use pypi_types::{Requirement, SupportedEnvironments}; @@ -277,8 +277,8 @@ pub(crate) async fn pip_compile( let index_locations = index_locations.combine( extra_index_urls .into_iter() - .map(IndexSource::from_extra_index_url) - .chain(index_url.map(IndexSource::from_index_url)) + .map(Index::from_extra_index_url) + .chain(index_url.map(Index::from_index_url)) .collect(), find_links, no_index, diff --git a/crates/uv/src/commands/pip/install.rs b/crates/uv/src/commands/pip/install.rs index 0ec8d063ff92..e8290f46c245 100644 --- a/crates/uv/src/commands/pip/install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -6,7 +6,7 @@ use owo_colors::OwoColorize; use tracing::{debug, enabled, Level}; use distribution_types::{ - DependencyMetadata, IndexLocations, IndexSource, NameRequirementSpecification, Resolution, + DependencyMetadata, Index, IndexLocations, NameRequirementSpecification, Resolution, UnresolvedRequirementSpecification, }; use install_wheel_rs::linker::LinkMode; @@ -275,8 +275,8 @@ pub(crate) async fn pip_install( let index_locations = index_locations.combine( extra_index_urls .into_iter() - .map(IndexSource::from_extra_index_url) - .chain(index_url.map(IndexSource::from_index_url)) + .map(Index::from_extra_index_url) + .chain(index_url.map(Index::from_index_url)) .collect(), find_links, no_index, diff --git a/crates/uv/src/commands/pip/sync.rs b/crates/uv/src/commands/pip/sync.rs index 66e0ca0a118d..0a0d075fdbbf 100644 --- a/crates/uv/src/commands/pip/sync.rs +++ b/crates/uv/src/commands/pip/sync.rs @@ -5,7 +5,7 @@ use anyhow::Result; use owo_colors::OwoColorize; use tracing::debug; -use distribution_types::{DependencyMetadata, IndexLocations, IndexSource, Resolution}; +use distribution_types::{DependencyMetadata, Index, IndexLocations, Resolution}; use install_wheel_rs::linker::LinkMode; use pep508_rs::PackageName; use uv_auth::store_credentials_from_url; @@ -218,8 +218,8 @@ pub(crate) async fn pip_sync( let index_locations = index_locations.combine( extra_index_urls .into_iter() - .map(IndexSource::from_extra_index_url) - .chain(index_url.map(IndexSource::from_index_url)) + .map(Index::from_extra_index_url) + .chain(index_url.map(Index::from_index_url)) .collect(), find_links, no_index, diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index f9d2496ee721..d1ca5e593f55 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -4,7 +4,7 @@ use std::path::PathBuf; use std::process; use std::str::FromStr; -use distribution_types::{DependencyMetadata, IndexLocations, IndexSource}; +use distribution_types::{DependencyMetadata, Index, IndexLocations}; use install_wheel_rs::linker::LinkMode; use pep508_rs::{ExtraName, RequirementOrigin}; use pypi_types::{Requirement, SupportedEnvironments}; @@ -1901,9 +1901,9 @@ impl From for ResolverSettings { .extra_index_url .into_iter() .flatten() - .map(IndexSource::from_extra_index_url), + .map(Index::from_extra_index_url), ) - .chain(value.index_url.into_iter().map(IndexSource::from_index_url)) + .chain(value.index_url.into_iter().map(Index::from_index_url)) .collect(), value.find_links.unwrap_or_default(), value.no_index.unwrap_or_default(), @@ -2039,9 +2039,9 @@ impl From for ResolverInstallerSettings { .extra_index_url .into_iter() .flatten() - .map(IndexSource::from_extra_index_url), + .map(Index::from_extra_index_url), ) - .chain(value.index_url.into_iter().map(IndexSource::from_index_url)) + .chain(value.index_url.into_iter().map(Index::from_index_url)) .collect(), value.find_links.unwrap_or_default(), value.no_index.unwrap_or_default(), @@ -2265,17 +2265,17 @@ impl PipSettings { args.extra_index_url .into_iter() .flatten() - .map(IndexSource::from_extra_index_url), + .map(Index::from_extra_index_url), ) - .chain(args.index_url.into_iter().map(IndexSource::from_index_url)) + .chain(args.index_url.into_iter().map(Index::from_index_url)) .chain(index.into_iter().flatten()) .chain( extra_index_url .into_iter() .flatten() - .map(IndexSource::from_extra_index_url), + .map(Index::from_extra_index_url), ) - .chain(index_url.into_iter().map(IndexSource::from_index_url)) + .chain(index_url.into_iter().map(Index::from_index_url)) .collect(), args.find_links.combine(find_links).unwrap_or_default(), args.no_index.combine(no_index).unwrap_or_default(), diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 4590fe19796c..638f1d78dd53 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -163,7 +163,7 @@ uv run [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -716,7 +716,7 @@ uv add [OPTIONS] >
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -1050,7 +1050,7 @@ uv remove [OPTIONS] ...
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -1372,7 +1372,7 @@ uv sync [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -1691,7 +1691,7 @@ uv lock [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -2000,7 +2000,7 @@ uv export [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -2316,7 +2316,7 @@ uv tree [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -2705,7 +2705,7 @@ uv tool run [OPTIONS] [COMMAND]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -3011,7 +3011,7 @@ uv tool install [OPTIONS]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -3309,7 +3309,7 @@ uv tool upgrade [OPTIONS] ...
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -4893,7 +4893,7 @@ uv pip compile [OPTIONS] ...
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -5297,7 +5297,7 @@ uv pip sync [OPTIONS] ...
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -5657,7 +5657,7 @@ uv pip install [OPTIONS] |--editable
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -6844,7 +6844,7 @@ uv venv [OPTIONS] [PATH]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

@@ -7103,7 +7103,7 @@ uv build [OPTIONS] [SRC]
--help, -h

Display the concise help for this command

-
--index index

The URLs of additional package indexes to use.

+
--index index

The URLs to use when resolving dependencies, in addition to the default index.

Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.

diff --git a/docs/reference/settings.md b/docs/reference/settings.md index 3419f51e60ba..142c67b4d877 100644 --- a/docs/reference/settings.md +++ b/docs/reference/settings.md @@ -640,7 +640,7 @@ formats described above. ### [`index`](#index) {: #index } -The indexes to use when resolving dependencies. +The package indexes to use when resolving dependencies. Accepts either a repository compliant with [PEP 503](https://peps.python.org/pep-0503/) (the simple repository API), or a local directory laid out in the same format.