mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-02 18:12:17 +00:00
Make Python and PyPy install mirrors configurable in uv.toml (#8695)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) --> ## Summary Adds python-install-mirror and pypy-install-mirror as keys for uv.toml, and cli args for `uv python install`. Could leave the cli args out if we think the env vars and configs are sufficient. Fixes #8186 <!-- What's the purpose of the change? What does it do, and why? --> --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
parent
2966471db2
commit
2ea81b3b55
29 changed files with 573 additions and 27 deletions
|
@ -3938,6 +3938,22 @@ pub struct PythonInstallArgs {
|
|||
/// See `uv help python` to view supported request formats.
|
||||
pub targets: Vec<String>,
|
||||
|
||||
/// Set the URL to use as the source for downloading Python installations.
|
||||
///
|
||||
/// The provided URL will replace `https://github.com/indygreg/python-build-standalone/releases/download` in, e.g., `https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
|
||||
///
|
||||
/// Distributions can be read from a local directory by using the `file://` URL scheme.
|
||||
#[arg(long, env = EnvVars::UV_PYTHON_INSTALL_MIRROR)]
|
||||
pub mirror: Option<String>,
|
||||
|
||||
/// Set the URL to use as the source for downloading PyPy installations.
|
||||
///
|
||||
/// The provided URL will replace `https://downloads.python.org/pypy` in, e.g., `https://downloads.python.org/pypy/pypy3.8-v7.3.7-osx64.tar.bz2`.
|
||||
///
|
||||
/// Distributions can be read from a local directory by using the `file://` URL scheme.
|
||||
#[arg(long, env = EnvVars::UV_PYPY_INSTALL_MIRROR)]
|
||||
pub pypy_mirror: Option<String>,
|
||||
|
||||
/// Reinstall the requested Python version, if it's already installed.
|
||||
///
|
||||
/// By default, uv will exit successfully if the version is already
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue