mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 10:33:49 +00:00
chore: unify all env vars used (#8151)
## Summary This PR declares and documents all environment variables that are used in one way or another in `uv`, either internally, or externally, or transitively under a common struct. I think over time as uv has grown there's been many environment variables introduced. Its harder to know which ones exists, which ones are missing, what they're used for, or where are they used across the code. The docs only documents a handful of them, for others you'd have to dive into the code and inspect across crates to know which crates they're used on or where they're relevant. This PR is a starting attempt to unify them, make it easier to discover which ones we have, and maybe unlock future posibilities in automating generating documentation for them. I think we can split out into multiple structs later to better organize, but given the high influx of PR's and possibly new environment variables introduced/re-used, it would be hard to try to organize them all now into their proper namespaced struct while this is all happening given merge conflicts and/or keeping up to date. I don't think this has any impact on performance as they all should still be inlined, although it may affect local build times on changes to the environment vars as more crates would likely need a rebuild. Lastly, some of them are declared but not used in the code, for example those in `build.rs`. I left them declared because I still think it's useful to at least have a reference. Did I miss any? Are their initial docs cohesive? Note, `uv-static` is a terrible name for a new crate, thoughts? Others considered `uv-vars`, `uv-consts`. ## Test Plan Existing tests
This commit is contained in:
parent
0a23be4a6a
commit
01c44af3c3
86 changed files with 1572 additions and 1104 deletions
|
@ -19,6 +19,7 @@ use uv_pep508::Requirement;
|
|||
use uv_pypi_types::VerbatimParsedUrl;
|
||||
use uv_python::{PythonDownloads, PythonPreference, PythonVersion};
|
||||
use uv_resolver::{AnnotationStyle, ExcludeNewer, PrereleaseMode, ResolutionMode};
|
||||
use uv_static::EnvVars;
|
||||
|
||||
pub mod compat;
|
||||
pub mod options;
|
||||
|
@ -97,7 +98,7 @@ pub struct TopLevelArgs {
|
|||
#[arg(
|
||||
global = true,
|
||||
long,
|
||||
env = "UV_CONFIG_FILE",
|
||||
env = EnvVars::UV_CONFIG_FILE,
|
||||
help_heading = "Global options"
|
||||
)]
|
||||
pub config_file: Option<PathBuf>,
|
||||
|
@ -106,7 +107,7 @@ pub struct TopLevelArgs {
|
|||
///
|
||||
/// Normally, configuration files are discovered in the current directory,
|
||||
/// parent directories, or user configuration directories.
|
||||
#[arg(global = true, long, env = "UV_NO_CONFIG", value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Global options")]
|
||||
#[arg(global = true, long, env = EnvVars::UV_NO_CONFIG, value_parser = clap::builder::BoolishValueParser::new(), help_heading = "Global options")]
|
||||
pub no_config: bool,
|
||||
|
||||
/// Display the concise help for this command.
|
||||
|
@ -133,7 +134,7 @@ pub struct GlobalArgs {
|
|||
long,
|
||||
help_heading = "Python options",
|
||||
display_order = 700,
|
||||
env = "UV_PYTHON_PREFERENCE"
|
||||
env = EnvVars::UV_PYTHON_PREFERENCE
|
||||
)]
|
||||
pub python_preference: Option<PythonPreference>,
|
||||
|
||||
|
@ -188,7 +189,7 @@ pub struct GlobalArgs {
|
|||
/// However, in some cases, you may want to use the platform's native certificate store,
|
||||
/// especially if you're relying on a corporate trust root (e.g., for a mandatory proxy) that's
|
||||
/// included in your system's certificate store.
|
||||
#[arg(global = true, long, env = "UV_NATIVE_TLS", value_parser = clap::builder::BoolishValueParser::new(), overrides_with("no_native_tls"))]
|
||||
#[arg(global = true, long, env = EnvVars::UV_NATIVE_TLS, value_parser = clap::builder::BoolishValueParser::new(), overrides_with("no_native_tls"))]
|
||||
pub native_tls: bool,
|
||||
|
||||
#[arg(global = true, long, overrides_with("native_tls"), hide = true)]
|
||||
|
@ -206,7 +207,7 @@ pub struct GlobalArgs {
|
|||
/// Whether to enable experimental, preview features.
|
||||
///
|
||||
/// Preview features may change without warning.
|
||||
#[arg(global = true, long, hide = true, env = "UV_PREVIEW", value_parser = clap::builder::BoolishValueParser::new(), overrides_with("no_preview"))]
|
||||
#[arg(global = true, long, hide = true, env = EnvVars::UV_PREVIEW, value_parser = clap::builder::BoolishValueParser::new(), overrides_with("no_preview"))]
|
||||
pub preview: bool,
|
||||
|
||||
#[arg(global = true, long, overrides_with("preview"), hide = true)]
|
||||
|
@ -468,7 +469,7 @@ pub struct SelfUpdateArgs {
|
|||
|
||||
/// A GitHub token for authentication.
|
||||
/// A token is not required but can be used to reduce the chance of encountering rate limits.
|
||||
#[arg(long, env = "UV_GITHUB_TOKEN")]
|
||||
#[arg(long, env = EnvVars::UV_GITHUB_TOKEN)]
|
||||
pub token: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -860,7 +861,7 @@ pub struct PipCompileArgs {
|
|||
/// trigger the installation of that package.
|
||||
///
|
||||
/// This is equivalent to pip's `--constraint` option.
|
||||
#[arg(long, short, env = "UV_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Override versions using the given requirements files.
|
||||
|
@ -872,7 +873,7 @@ pub struct PipCompileArgs {
|
|||
/// While constraints are _additive_, in that they're combined with the requirements of the
|
||||
/// constituent packages, overrides are _absolute_, in that they completely replace the
|
||||
/// requirements of the constituent packages.
|
||||
#[arg(long, env = "UV_OVERRIDE", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, env = EnvVars::UV_OVERRIDE, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub r#override: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Constrain build dependencies using the given requirements files when building source
|
||||
|
@ -881,7 +882,7 @@ pub struct PipCompileArgs {
|
|||
/// Constraints files are `requirements.txt`-like files that only control the _version_ of a
|
||||
/// requirement that's installed. However, including a package in a constraints file will _not_
|
||||
/// trigger the installation of that package.
|
||||
#[arg(long, short, env = "UV_BUILD_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_BUILD_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub build_constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Include optional dependencies from the extra group name; may be provided more than once.
|
||||
|
@ -965,7 +966,7 @@ pub struct PipCompileArgs {
|
|||
/// The header comment to include at the top of the output file generated by `uv pip compile`.
|
||||
///
|
||||
/// Used to reflect custom build scripts and commands that wrap `uv pip compile`.
|
||||
#[arg(long, env = "UV_CUSTOM_COMPILE_COMMAND")]
|
||||
#[arg(long, env = EnvVars::UV_CUSTOM_COMPILE_COMMAND)]
|
||||
pub custom_compile_command: Option<String>,
|
||||
|
||||
/// The Python interpreter to use during resolution.
|
||||
|
@ -989,7 +990,7 @@ pub struct PipCompileArgs {
|
|||
/// the system path.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1161,7 +1162,7 @@ pub struct PipSyncArgs {
|
|||
/// trigger the installation of that package.
|
||||
///
|
||||
/// This is equivalent to pip's `--constraint` option.
|
||||
#[arg(long, short, env = "UV_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Constrain build dependencies using the given requirements files when building source
|
||||
|
@ -1170,7 +1171,7 @@ pub struct PipSyncArgs {
|
|||
/// Constraints files are `requirements.txt`-like files that only control the _version_ of a
|
||||
/// requirement that's installed. However, including a package in a constraints file will _not_
|
||||
/// trigger the installation of that package.
|
||||
#[arg(long, short, env = "UV_BUILD_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_BUILD_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub build_constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
#[command(flatten)]
|
||||
|
@ -1193,7 +1194,7 @@ pub struct PipSyncArgs {
|
|||
/// source archive (`.zip`, `.tar.gz`), as opposed to a directory.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_REQUIRE_HASHES",
|
||||
env = EnvVars::UV_REQUIRE_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_require_hashes"),
|
||||
)]
|
||||
|
@ -1209,7 +1210,7 @@ pub struct PipSyncArgs {
|
|||
/// include them.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_VERIFY_HASHES",
|
||||
env = EnvVars::UV_VERIFY_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_verify_hashes"),
|
||||
)]
|
||||
|
@ -1230,7 +1231,7 @@ pub struct PipSyncArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1247,7 +1248,7 @@ pub struct PipSyncArgs {
|
|||
/// should be used with caution, as it can modify the system Python installation.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1264,7 +1265,7 @@ pub struct PipSyncArgs {
|
|||
/// explicitly recommend against modifications by other package managers (like uv or `pip`).
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_BREAK_SYSTEM_PACKAGES",
|
||||
env = EnvVars::UV_BREAK_SYSTEM_PACKAGES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_break_system_packages")
|
||||
)]
|
||||
|
@ -1409,7 +1410,7 @@ pub struct PipInstallArgs {
|
|||
/// trigger the installation of that package.
|
||||
///
|
||||
/// This is equivalent to pip's `--constraint` option.
|
||||
#[arg(long, short, env = "UV_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Override versions using the given requirements files.
|
||||
|
@ -1421,7 +1422,7 @@ pub struct PipInstallArgs {
|
|||
/// While constraints are _additive_, in that they're combined with the requirements of the
|
||||
/// constituent packages, overrides are _absolute_, in that they completely replace the
|
||||
/// requirements of the constituent packages.
|
||||
#[arg(long, env = "UV_OVERRIDE", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, env = EnvVars::UV_OVERRIDE, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub r#override: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Constrain build dependencies using the given requirements files when building source
|
||||
|
@ -1430,7 +1431,7 @@ pub struct PipInstallArgs {
|
|||
/// Constraints files are `requirements.txt`-like files that only control the _version_ of a
|
||||
/// requirement that's installed. However, including a package in a constraints file will _not_
|
||||
/// trigger the installation of that package.
|
||||
#[arg(long, short, env = "UV_BUILD_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_BUILD_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub build_constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Include optional dependencies from the extra group name; may be provided more than once.
|
||||
|
@ -1476,7 +1477,7 @@ pub struct PipInstallArgs {
|
|||
/// source archive (`.zip`, `.tar.gz`), as opposed to a directory.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_REQUIRE_HASHES",
|
||||
env = EnvVars::UV_REQUIRE_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_require_hashes"),
|
||||
)]
|
||||
|
@ -1492,7 +1493,7 @@ pub struct PipInstallArgs {
|
|||
/// include them.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_VERIFY_HASHES",
|
||||
env = EnvVars::UV_VERIFY_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_verify_hashes"),
|
||||
)]
|
||||
|
@ -1513,7 +1514,7 @@ pub struct PipInstallArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1530,7 +1531,7 @@ pub struct PipInstallArgs {
|
|||
/// should be used with caution, as it can modify the system Python installation.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1547,7 +1548,7 @@ pub struct PipInstallArgs {
|
|||
/// explicitly recommend against modifications by other package managers (like uv or `pip`).
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_BREAK_SYSTEM_PACKAGES",
|
||||
env = EnvVars::UV_BREAK_SYSTEM_PACKAGES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_break_system_packages")
|
||||
)]
|
||||
|
@ -1691,7 +1692,7 @@ pub struct PipUninstallArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1704,7 +1705,7 @@ pub struct PipUninstallArgs {
|
|||
/// use the `keyring` CLI to handle authentication.
|
||||
///
|
||||
/// Defaults to `disabled`.
|
||||
#[arg(long, value_enum, env = "UV_KEYRING_PROVIDER")]
|
||||
#[arg(long, value_enum, env = EnvVars::UV_KEYRING_PROVIDER)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
||||
/// Allow insecure connections to a host.
|
||||
|
@ -1720,7 +1721,7 @@ pub struct PipUninstallArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
)]
|
||||
|
@ -1736,7 +1737,7 @@ pub struct PipUninstallArgs {
|
|||
/// should be used with caution, as it can modify the system Python installation.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1753,7 +1754,7 @@ pub struct PipUninstallArgs {
|
|||
/// explicitly recommend against modifications by other package managers (like uv or `pip`).
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_BREAK_SYSTEM_PACKAGES",
|
||||
env = EnvVars::UV_BREAK_SYSTEM_PACKAGES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_break_system_packages")
|
||||
)]
|
||||
|
@ -1800,7 +1801,7 @@ pub struct PipFreezeArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1814,7 +1815,7 @@ pub struct PipFreezeArgs {
|
|||
/// See `uv help python` for details on Python discovery.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1865,7 +1866,7 @@ pub struct PipListArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1879,7 +1880,7 @@ pub struct PipListArgs {
|
|||
/// See `uv help python` for details on Python discovery.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1906,7 +1907,7 @@ pub struct PipCheckArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1920,7 +1921,7 @@ pub struct PipCheckArgs {
|
|||
/// See `uv help python` for details on Python discovery.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -1955,7 +1956,7 @@ pub struct PipShowArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -1969,7 +1970,7 @@ pub struct PipShowArgs {
|
|||
/// See `uv help python` for details on Python discovery.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -2011,7 +2012,7 @@ pub struct PipTreeArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2025,7 +2026,7 @@ pub struct PipTreeArgs {
|
|||
/// See `uv help python` for details on Python discovery.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -2094,7 +2095,7 @@ pub struct BuildArgs {
|
|||
/// Constraints files are `requirements.txt`-like files that only control the _version_ of a
|
||||
/// build dependency that's installed. However, including a package in a constraints file will
|
||||
/// _not_ trigger the inclusion of that package on its own.
|
||||
#[arg(long, short, env = "UV_BUILD_CONSTRAINT", value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
#[arg(long, short, env = EnvVars::UV_BUILD_CONSTRAINT, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
|
||||
pub build_constraint: Vec<Maybe<PathBuf>>,
|
||||
|
||||
/// Require a matching hash for each build requirement.
|
||||
|
@ -2112,7 +2113,7 @@ pub struct BuildArgs {
|
|||
/// source archive (`.zip`, `.tar.gz`), as opposed to a directory.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_REQUIRE_HASHES",
|
||||
env = EnvVars::UV_REQUIRE_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_require_hashes"),
|
||||
)]
|
||||
|
@ -2128,7 +2129,7 @@ pub struct BuildArgs {
|
|||
/// include them.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_VERIFY_HASHES",
|
||||
env = EnvVars::UV_VERIFY_HASHES,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_verify_hashes"),
|
||||
)]
|
||||
|
@ -2147,7 +2148,7 @@ pub struct BuildArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2177,7 +2178,7 @@ pub struct VenvArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2189,7 +2190,7 @@ pub struct VenvArgs {
|
|||
/// This is the default behavior and has no effect.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system"),
|
||||
hide = true,
|
||||
|
@ -2283,7 +2284,7 @@ pub struct VenvArgs {
|
|||
/// limit resolutions to those present on that first index (`first-match`). This prevents
|
||||
/// "dependency confusion" attacks, whereby an attack can upload a malicious package under the
|
||||
/// same name to a secondary.
|
||||
#[arg(long, value_enum, env = "UV_INDEX_STRATEGY")]
|
||||
#[arg(long, value_enum, env = EnvVars::UV_INDEX_STRATEGY)]
|
||||
pub index_strategy: Option<IndexStrategy>,
|
||||
|
||||
/// Attempt to use `keyring` for authentication for index URLs.
|
||||
|
@ -2292,7 +2293,7 @@ pub struct VenvArgs {
|
|||
/// use the `keyring` CLI to handle authentication.
|
||||
///
|
||||
/// Defaults to `disabled`.
|
||||
#[arg(long, value_enum, env = "UV_KEYRING_PROVIDER")]
|
||||
#[arg(long, value_enum, env = EnvVars::UV_KEYRING_PROVIDER)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
||||
/// Allow insecure connections to a host.
|
||||
|
@ -2308,7 +2309,7 @@ pub struct VenvArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
)]
|
||||
|
@ -2318,7 +2319,7 @@ pub struct VenvArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same
|
||||
/// format (e.g., `2006-12-02`) in your system's configured time zone.
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER")]
|
||||
#[arg(long, env = EnvVars::UV_EXCLUDE_NEWER)]
|
||||
pub exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// The method to use when installing packages from the global cache.
|
||||
|
@ -2327,7 +2328,7 @@ pub struct VenvArgs {
|
|||
///
|
||||
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
|
||||
/// Windows.
|
||||
#[arg(long, value_enum, env = "UV_LINK_MODE")]
|
||||
#[arg(long, value_enum, env = EnvVars::UV_LINK_MODE)]
|
||||
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
|
||||
|
||||
#[command(flatten)]
|
||||
|
@ -2493,7 +2494,7 @@ pub struct InitArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2607,7 +2608,7 @@ pub struct RunArgs {
|
|||
///
|
||||
/// Implies `--frozen`, as the project dependencies will be ignored (i.e., the lockfile will not
|
||||
/// be updated, since the environment will not be synced regardless).
|
||||
#[arg(long, env = "UV_NO_SYNC", value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
#[arg(long, env = EnvVars::UV_NO_SYNC, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
pub no_sync: bool,
|
||||
|
||||
/// Assert that the `uv.lock` will remain unchanged.
|
||||
|
@ -2669,7 +2670,7 @@ pub struct RunArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2679,7 +2680,7 @@ pub struct RunArgs {
|
|||
/// Whether to show resolver and installer output from any environment modifications.
|
||||
///
|
||||
/// By default, environment modifications are omitted, but enabled under `--verbose`.
|
||||
#[arg(long, env = "UV_SHOW_RESOLUTION", value_parser = clap::builder::BoolishValueParser::new(), hide = true)]
|
||||
#[arg(long, env = EnvVars::UV_SHOW_RESOLUTION, value_parser = clap::builder::BoolishValueParser::new(), hide = true)]
|
||||
pub show_resolution: bool,
|
||||
}
|
||||
|
||||
|
@ -2812,7 +2813,7 @@ pub struct SyncArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2856,7 +2857,7 @@ pub struct LockArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -2933,7 +2934,7 @@ pub struct AddArgs {
|
|||
pub extra: Option<Vec<ExtraName>>,
|
||||
|
||||
/// Avoid syncing the virtual environment.
|
||||
#[arg(long, env = "UV_NO_SYNC", value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
#[arg(long, env = EnvVars::UV_NO_SYNC, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
pub no_sync: bool,
|
||||
|
||||
/// Assert that the `uv.lock` will remain unchanged.
|
||||
|
@ -2979,7 +2980,7 @@ pub struct AddArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3003,7 +3004,7 @@ pub struct RemoveArgs {
|
|||
pub optional: Option<ExtraName>,
|
||||
|
||||
/// Avoid syncing the virtual environment after re-locking the project.
|
||||
#[arg(long, env = "UV_NO_SYNC", value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
#[arg(long, env = EnvVars::UV_NO_SYNC, value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "frozen")]
|
||||
pub no_sync: bool,
|
||||
|
||||
/// Assert that the `uv.lock` will remain unchanged.
|
||||
|
@ -3046,7 +3047,7 @@ pub struct RemoveArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3132,7 +3133,7 @@ pub struct TreeArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3264,7 +3265,7 @@ pub struct ExportArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3419,7 +3420,7 @@ pub struct ToolRunArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3429,7 +3430,7 @@ pub struct ToolRunArgs {
|
|||
/// Whether to show resolver and installer output from any environment modifications.
|
||||
///
|
||||
/// By default, environment modifications are omitted, but enabled under `--verbose`.
|
||||
#[arg(long, env = "UV_SHOW_RESOLUTION", value_parser = clap::builder::BoolishValueParser::new(), hide = true)]
|
||||
#[arg(long, env = EnvVars::UV_SHOW_RESOLUTION, value_parser = clap::builder::BoolishValueParser::new(), hide = true)]
|
||||
pub show_resolution: bool,
|
||||
|
||||
#[arg(long, hide = true)]
|
||||
|
@ -3481,7 +3482,7 @@ pub struct ToolInstallArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3558,7 +3559,7 @@ pub struct ToolUpgradeArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_PYTHON",
|
||||
env = EnvVars::UV_PYTHON,
|
||||
verbatim_doc_comment,
|
||||
help_heading = "Python options",
|
||||
value_parser = parse_maybe_string,
|
||||
|
@ -3722,7 +3723,7 @@ pub struct PythonFindArgs {
|
|||
/// restrict its search to the system path.
|
||||
#[arg(
|
||||
long,
|
||||
env = "UV_SYSTEM_PYTHON",
|
||||
env = EnvVars::UV_SYSTEM_PYTHON,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
overrides_with("no_system")
|
||||
)]
|
||||
|
@ -3814,7 +3815,7 @@ pub struct IndexArgs {
|
|||
///
|
||||
/// The index given by this flag is given lower priority than all other
|
||||
/// indexes specified via the `--extra-index-url` flag.
|
||||
#[arg(long, short, env = "UV_INDEX_URL", value_parser = parse_index_url, help_heading = "Index options")]
|
||||
#[arg(long, short, env = EnvVars::UV_INDEX_URL, value_parser = parse_index_url, help_heading = "Index options")]
|
||||
pub index_url: Option<Maybe<IndexUrl>>,
|
||||
|
||||
/// Extra URLs of package indexes to use, in addition to `--index-url`.
|
||||
|
@ -3825,7 +3826,7 @@ pub struct IndexArgs {
|
|||
/// All indexes provided via this flag take priority over the index specified by
|
||||
/// `--index-url` (which defaults to PyPI). When multiple `--extra-index-url` flags are
|
||||
/// provided, earlier values take priority.
|
||||
#[arg(long, env = "UV_EXTRA_INDEX_URL", value_delimiter = ' ', value_parser = parse_index_url, help_heading = "Index options")]
|
||||
#[arg(long, env = EnvVars::UV_EXTRA_INDEX_URL, value_delimiter = ' ', value_parser = parse_index_url, help_heading = "Index options")]
|
||||
pub extra_index_url: Option<Vec<Maybe<IndexUrl>>>,
|
||||
|
||||
/// Locations to search for candidate distributions, in addition to those found in the registry
|
||||
|
@ -3839,7 +3840,7 @@ pub struct IndexArgs {
|
|||
#[arg(
|
||||
long,
|
||||
short,
|
||||
env = "UV_FIND_LINKS",
|
||||
env = EnvVars::UV_FIND_LINKS,
|
||||
value_parser = parse_flat_index,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
|
@ -3959,7 +3960,7 @@ pub struct InstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_INDEX_STRATEGY",
|
||||
env = EnvVars::UV_INDEX_STRATEGY,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub index_strategy: Option<IndexStrategy>,
|
||||
|
@ -3973,7 +3974,7 @@ pub struct InstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_KEYRING_PROVIDER",
|
||||
env = EnvVars::UV_KEYRING_PROVIDER,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
@ -3991,7 +3992,7 @@ pub struct InstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
help_heading = "Index options"
|
||||
|
@ -4014,7 +4015,7 @@ pub struct InstallerArgs {
|
|||
long,
|
||||
overrides_with("build_isolation"),
|
||||
help_heading = "Build options",
|
||||
env = "UV_NO_BUILD_ISOLATION",
|
||||
env = EnvVars::UV_NO_BUILD_ISOLATION,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
)]
|
||||
pub no_build_isolation: bool,
|
||||
|
@ -4031,7 +4032,7 @@ pub struct InstallerArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same
|
||||
/// format (e.g., `2006-12-02`) in your system's configured time zone.
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER", help_heading = "Resolver options")]
|
||||
#[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")]
|
||||
pub exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// The method to use when installing packages from the global cache.
|
||||
|
@ -4041,7 +4042,7 @@ pub struct InstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_LINK_MODE",
|
||||
env = EnvVars::UV_LINK_MODE,
|
||||
help_heading = "Installer options"
|
||||
)]
|
||||
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
|
||||
|
@ -4061,7 +4062,7 @@ pub struct InstallerArgs {
|
|||
alias = "compile",
|
||||
overrides_with("no_compile_bytecode"),
|
||||
help_heading = "Installer options",
|
||||
env = "UV_COMPILE_BYTECODE",
|
||||
env = EnvVars::UV_COMPILE_BYTECODE,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
)]
|
||||
pub compile_bytecode: bool,
|
||||
|
@ -4121,7 +4122,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_INDEX_STRATEGY",
|
||||
env = EnvVars::UV_INDEX_STRATEGY,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub index_strategy: Option<IndexStrategy>,
|
||||
|
@ -4135,7 +4136,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_KEYRING_PROVIDER",
|
||||
env = EnvVars::UV_KEYRING_PROVIDER,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
@ -4153,7 +4154,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
help_heading = "Index options"
|
||||
|
@ -4167,7 +4168,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_RESOLUTION",
|
||||
env = EnvVars::UV_RESOLUTION,
|
||||
help_heading = "Resolver options"
|
||||
)]
|
||||
pub resolution: Option<ResolutionMode>,
|
||||
|
@ -4180,7 +4181,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_PRERELEASE",
|
||||
env = EnvVars::UV_PRERELEASE,
|
||||
help_heading = "Resolver options"
|
||||
)]
|
||||
pub prerelease: Option<PrereleaseMode>,
|
||||
|
@ -4204,7 +4205,7 @@ pub struct ResolverArgs {
|
|||
long,
|
||||
overrides_with("build_isolation"),
|
||||
help_heading = "Build options",
|
||||
env = "UV_NO_BUILD_ISOLATION",
|
||||
env = EnvVars::UV_NO_BUILD_ISOLATION,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
)]
|
||||
pub no_build_isolation: bool,
|
||||
|
@ -4227,7 +4228,7 @@ pub struct ResolverArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same
|
||||
/// format (e.g., `2006-12-02`) in your system's configured time zone.
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER", help_heading = "Resolver options")]
|
||||
#[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")]
|
||||
pub exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// The method to use when installing packages from the global cache.
|
||||
|
@ -4239,7 +4240,7 @@ pub struct ResolverArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_LINK_MODE",
|
||||
env = EnvVars::UV_LINK_MODE,
|
||||
help_heading = "Installer options"
|
||||
)]
|
||||
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
|
||||
|
@ -4313,7 +4314,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_INDEX_STRATEGY",
|
||||
env = EnvVars::UV_INDEX_STRATEGY,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub index_strategy: Option<IndexStrategy>,
|
||||
|
@ -4327,7 +4328,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_KEYRING_PROVIDER",
|
||||
env = EnvVars::UV_KEYRING_PROVIDER,
|
||||
help_heading = "Index options"
|
||||
)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
@ -4345,7 +4346,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
help_heading = "Index options"
|
||||
|
@ -4359,7 +4360,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_RESOLUTION",
|
||||
env = EnvVars::UV_RESOLUTION,
|
||||
help_heading = "Resolver options"
|
||||
)]
|
||||
pub resolution: Option<ResolutionMode>,
|
||||
|
@ -4372,7 +4373,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_PRERELEASE",
|
||||
env = EnvVars::UV_PRERELEASE,
|
||||
help_heading = "Resolver options"
|
||||
)]
|
||||
pub prerelease: Option<PrereleaseMode>,
|
||||
|
@ -4396,7 +4397,7 @@ pub struct ResolverInstallerArgs {
|
|||
long,
|
||||
overrides_with("build_isolation"),
|
||||
help_heading = "Build options",
|
||||
env = "UV_NO_BUILD_ISOLATION",
|
||||
env = EnvVars::UV_NO_BUILD_ISOLATION,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
)]
|
||||
pub no_build_isolation: bool,
|
||||
|
@ -4419,7 +4420,7 @@ pub struct ResolverInstallerArgs {
|
|||
///
|
||||
/// Accepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same
|
||||
/// format (e.g., `2006-12-02`) in your system's configured time zone.
|
||||
#[arg(long, env = "UV_EXCLUDE_NEWER", help_heading = "Resolver options")]
|
||||
#[arg(long, env = EnvVars::UV_EXCLUDE_NEWER, help_heading = "Resolver options")]
|
||||
pub exclude_newer: Option<ExcludeNewer>,
|
||||
|
||||
/// The method to use when installing packages from the global cache.
|
||||
|
@ -4429,7 +4430,7 @@ pub struct ResolverInstallerArgs {
|
|||
#[arg(
|
||||
long,
|
||||
value_enum,
|
||||
env = "UV_LINK_MODE",
|
||||
env = EnvVars::UV_LINK_MODE,
|
||||
help_heading = "Installer options"
|
||||
)]
|
||||
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
|
||||
|
@ -4449,7 +4450,7 @@ pub struct ResolverInstallerArgs {
|
|||
alias = "compile",
|
||||
overrides_with("no_compile_bytecode"),
|
||||
help_heading = "Installer options",
|
||||
env = "UV_COMPILE_BYTECODE",
|
||||
env = EnvVars::UV_COMPILE_BYTECODE,
|
||||
value_parser = clap::builder::BoolishValueParser::new(),
|
||||
)]
|
||||
pub compile_bytecode: bool,
|
||||
|
@ -4515,15 +4516,15 @@ pub struct PublishArgs {
|
|||
/// Defaults to PyPI's publish URL (<https://upload.pypi.org/legacy/>).
|
||||
///
|
||||
/// The default value is publish URL for PyPI (<https://upload.pypi.org/legacy/>).
|
||||
#[arg(long, env = "UV_PUBLISH_URL")]
|
||||
#[arg(long, env = EnvVars::UV_PUBLISH_URL)]
|
||||
pub publish_url: Option<Url>,
|
||||
|
||||
/// The username for the upload.
|
||||
#[arg(short, long, env = "UV_PUBLISH_USERNAME")]
|
||||
#[arg(short, long, env = EnvVars::UV_PUBLISH_USERNAME)]
|
||||
pub username: Option<String>,
|
||||
|
||||
/// The password for the upload.
|
||||
#[arg(short, long, env = "UV_PUBLISH_PASSWORD")]
|
||||
#[arg(short, long, env = EnvVars::UV_PUBLISH_PASSWORD)]
|
||||
pub password: Option<String>,
|
||||
|
||||
/// The token for the upload.
|
||||
|
@ -4533,7 +4534,7 @@ pub struct PublishArgs {
|
|||
#[arg(
|
||||
short,
|
||||
long,
|
||||
env = "UV_PUBLISH_TOKEN",
|
||||
env = EnvVars::UV_PUBLISH_TOKEN,
|
||||
conflicts_with = "username",
|
||||
conflicts_with = "password"
|
||||
)]
|
||||
|
@ -4553,7 +4554,7 @@ pub struct PublishArgs {
|
|||
/// use the `keyring` CLI to handle authentication.
|
||||
///
|
||||
/// Defaults to `disabled`.
|
||||
#[arg(long, value_enum, env = "UV_KEYRING_PROVIDER")]
|
||||
#[arg(long, value_enum, env = EnvVars::UV_KEYRING_PROVIDER)]
|
||||
pub keyring_provider: Option<KeyringProviderType>,
|
||||
|
||||
/// Allow insecure connections to a host.
|
||||
|
@ -4569,7 +4570,7 @@ pub struct PublishArgs {
|
|||
#[arg(
|
||||
long,
|
||||
alias = "trusted-host",
|
||||
env = "UV_INSECURE_HOST",
|
||||
env = EnvVars::UV_INSECURE_HOST,
|
||||
value_delimiter = ' ',
|
||||
value_parser = parse_insecure_host,
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue