Add support for configuring python-downloads with UV_PYTHON_DOWNLOADS (#6436)

Part of https://github.com/astral-sh/uv/issues/6406

Replaces #6416
This commit is contained in:
Zanie Blue 2024-08-22 18:19:03 -05:00 committed by GitHub
parent 99d278f9f5
commit 7502a963e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 74 additions and 45 deletions

View file

@ -120,11 +120,13 @@ pub struct GlobalArgs {
)]
pub python_preference: Option<PythonPreference>,
/// Allow automatically downloading Python when required.
#[allow(clippy::doc_markdown)]
/// Allow automatically downloading Python when required. [env: "UV_PYTHON_DOWNLOADS=auto"]
#[arg(global = true, long, help_heading = "Python options", hide = true)]
pub allow_python_downloads: bool,
/// Disable automatic downloads of Python.
#[allow(clippy::doc_markdown)]
/// Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"]
#[arg(global = true, long, help_heading = "Python options")]
pub no_python_downloads: bool,