From dd7da6af5fa9ad166f0b8cbd5cca93b49b823eaf Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 3 Jul 2024 08:44:29 -0400 Subject: [PATCH] Change "toolchain" to "python" (#4735) Whew this is a lot. The user-facing changes are: - `uv toolchain` to `uv python` e.g. `uv python find`, `uv python install`, ... - `UV_TOOLCHAIN_DIR` to` UV_PYTHON_INSTALL_DIR` - `/toolchains` to `/python` (with [automatic migration](https://github.com/astral-sh/uv/pull/4735/files#r1663029330)) - User-facing messages no longer refer to toolchains, instead using "Python", "Python versions" or "Python installations" The internal changes are: - `uv-toolchain` crate to `uv-python` - `Toolchain` no longer referenced in type names - Dropped unused `SystemPython` type (previously replaced) - Clarified the type names for "managed Python installations" - (more little things) --- .github/workflows/ci.yml | 4 +- CONTRIBUTING.md | 2 +- Cargo.lock | 116 +- Cargo.toml | 2 +- crates/README.md | 2 +- crates/bench/Cargo.toml | 2 +- crates/bench/benches/uv.rs | 4 +- crates/uv-build/Cargo.toml | 2 +- crates/uv-build/src/lib.rs | 2 +- crates/uv-cli/Cargo.toml | 2 +- crates/uv-cli/src/lib.rs | 63 +- crates/uv-dev/Cargo.toml | 2 +- crates/uv-dev/src/build.rs | 8 +- crates/uv-dev/src/compile.rs | 4 +- crates/uv-dispatch/Cargo.toml | 2 +- crates/uv-dispatch/src/lib.rs | 2 +- crates/uv-installer/Cargo.toml | 2 +- crates/uv-installer/src/installer.rs | 2 +- crates/uv-installer/src/plan.rs | 2 +- crates/uv-installer/src/site_packages.rs | 2 +- crates/{uv-toolchain => uv-python}/Cargo.toml | 2 +- .../download-metadata.json | 0 .../fetch-download-metadata.py | 0 .../python/__init__.py | 0 .../python/get_interpreter_info.py | 0 .../python/packaging/LICENSE.APACHE | 0 .../python/packaging/LICENSE.BSD | 0 .../python/packaging/README.md | 0 .../python/packaging/__init__.py | 0 .../python/packaging/_elffile.py | 0 .../python/packaging/_manylinux.py | 0 .../python/packaging/_musllinux.py | 0 .../src/discovery.rs | 502 ++-- .../src/downloads.inc | 2030 ++++++++--------- .../src/downloads.inc.mustache | 6 +- .../src/downloads.rs | 63 +- .../src/environment.rs | 40 +- .../src/implementation.rs | 0 .../src/installation.rs} | 141 +- .../src/interpreter.rs | 0 crates/{uv-toolchain => uv-python}/src/lib.rs | 793 +++---- .../src/managed.rs | 135 +- .../src/platform.rs | 0 .../src/pointer_size.rs | 0 .../{uv-toolchain => uv-python}/src/prefix.rs | 0 .../src/py_launcher.rs | 0 .../src/python_version.rs | 0 .../{uv-toolchain => uv-python}/src/target.rs | 0 .../src/version_files.rs | 18 +- .../src/virtualenv.rs | 0 .../template-download-metadata.py | 2 +- crates/uv-resolver/Cargo.toml | 2 +- crates/uv-resolver/src/python_requirement.rs | 2 +- crates/uv-settings/Cargo.toml | 2 +- crates/uv-settings/src/combine.rs | 6 +- crates/uv-settings/src/settings.rs | 6 +- crates/uv-state/src/lib.rs | 6 +- crates/uv-tool/Cargo.toml | 2 +- crates/uv-tool/src/lib.rs | 4 +- crates/uv-types/Cargo.toml | 2 +- crates/uv-types/src/builds.rs | 2 +- crates/uv-types/src/traits.rs | 2 +- crates/uv-virtualenv/Cargo.toml | 2 +- crates/uv-virtualenv/src/bare.rs | 2 +- crates/uv-virtualenv/src/lib.rs | 6 +- crates/uv/Cargo.toml | 2 +- crates/uv/src/commands/mod.rs | 14 +- crates/uv/src/commands/pip/check.rs | 4 +- crates/uv/src/commands/pip/compile.rs | 22 +- crates/uv/src/commands/pip/freeze.rs | 4 +- crates/uv/src/commands/pip/install.rs | 8 +- crates/uv/src/commands/pip/list.rs | 6 +- crates/uv/src/commands/pip/mod.rs | 2 +- crates/uv/src/commands/pip/operations.rs | 2 +- crates/uv/src/commands/pip/show.rs | 4 +- crates/uv/src/commands/pip/sync.rs | 8 +- crates/uv/src/commands/pip/tree.rs | 8 +- crates/uv/src/commands/pip/uninstall.rs | 8 +- crates/uv/src/commands/project/add.rs | 12 +- crates/uv/src/commands/project/lock.rs | 12 +- crates/uv/src/commands/project/mod.rs | 42 +- crates/uv/src/commands/project/remove.rs | 12 +- crates/uv/src/commands/project/run.rs | 46 +- crates/uv/src/commands/project/sync.rs | 12 +- .../src/commands/{toolchain => python}/dir.rs | 8 +- .../commands/{toolchain => python}/find.rs | 18 +- .../commands/{toolchain => python}/install.rs | 55 +- .../commands/{toolchain => python}/list.rs | 50 +- .../src/commands/{toolchain => python}/mod.rs | 0 crates/uv/src/commands/python/uninstall.rs | 124 + crates/uv/src/commands/tool/install.rs | 20 +- crates/uv/src/commands/tool/run.rs | 20 +- crates/uv/src/commands/toolchain/uninstall.rs | 121 - crates/uv/src/commands/venv.rs | 28 +- crates/uv/src/main.rs | 80 +- crates/uv/src/settings.rs | 93 +- crates/uv/tests/common/mod.rs | 54 +- crates/uv/tests/lock.rs | 6 +- crates/uv/tests/python_dir.rs | 21 + .../{toolchain_find.rs => python_find.rs} | 30 +- crates/uv/tests/show_settings.rs | 68 +- crates/uv/tests/toolchain_dir.rs | 23 - docs/first-steps.md | 6 +- docs/preview/toolchains.md | 20 +- uv.schema.json | 154 +- 105 files changed, 2629 insertions(+), 2603 deletions(-) rename crates/{uv-toolchain => uv-python}/Cargo.toml (98%) rename crates/{uv-toolchain => uv-python}/download-metadata.json (100%) rename crates/{uv-toolchain => uv-python}/fetch-download-metadata.py (100%) rename crates/{uv-toolchain => uv-python}/python/__init__.py (100%) rename crates/{uv-toolchain => uv-python}/python/get_interpreter_info.py (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/LICENSE.APACHE (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/LICENSE.BSD (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/README.md (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/__init__.py (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/_elffile.py (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/_manylinux.py (100%) rename crates/{uv-toolchain => uv-python}/python/packaging/_musllinux.py (100%) rename crates/{uv-toolchain => uv-python}/src/discovery.rs (78%) rename crates/{uv-toolchain => uv-python}/src/downloads.inc (90%) rename crates/{uv-toolchain => uv-python}/src/downloads.inc.mustache (87%) rename crates/{uv-toolchain => uv-python}/src/downloads.rs (86%) rename crates/{uv-toolchain => uv-python}/src/environment.rs (86%) rename crates/{uv-toolchain => uv-python}/src/implementation.rs (100%) rename crates/{uv-toolchain/src/toolchain.rs => uv-python/src/installation.rs} (62%) rename crates/{uv-toolchain => uv-python}/src/interpreter.rs (100%) rename crates/{uv-toolchain => uv-python}/src/lib.rs (69%) rename crates/{uv-toolchain => uv-python}/src/managed.rs (64%) rename crates/{uv-toolchain => uv-python}/src/platform.rs (100%) rename crates/{uv-toolchain => uv-python}/src/pointer_size.rs (100%) rename crates/{uv-toolchain => uv-python}/src/prefix.rs (100%) rename crates/{uv-toolchain => uv-python}/src/py_launcher.rs (100%) rename crates/{uv-toolchain => uv-python}/src/python_version.rs (100%) rename crates/{uv-toolchain => uv-python}/src/target.rs (100%) rename crates/{uv-toolchain => uv-python}/src/version_files.rs (74%) rename crates/{uv-toolchain => uv-python}/src/virtualenv.rs (100%) rename crates/{uv-toolchain => uv-python}/template-download-metadata.py (97%) rename crates/uv/src/commands/{toolchain => python}/dir.rs (58%) rename crates/uv/src/commands/{toolchain => python}/find.rs (56%) rename crates/uv/src/commands/{toolchain => python}/install.rs (64%) rename crates/uv/src/commands/{toolchain => python}/list.rs (70%) rename crates/uv/src/commands/{toolchain => python}/mod.rs (100%) create mode 100644 crates/uv/src/commands/python/uninstall.rs delete mode 100644 crates/uv/src/commands/toolchain/uninstall.rs create mode 100644 crates/uv/tests/python_dir.rs rename crates/uv/tests/{toolchain_find.rs => python_find.rs} (69%) delete mode 100644 crates/uv/tests/toolchain_dir.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 461143481..0bf0ab255 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: - name: "Install required Python versions" run: | - cargo run toolchain install + cargo run python install - name: "Install cargo nextest" uses: taiki-e/install-action@v2 @@ -172,7 +172,7 @@ jobs: - name: "Install required Python versions" run: | - cargo run toolchain install + cargo run python install - name: "Install cargo nextest" uses: taiki-e/install-action@v2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7ab2827e..f07fa80ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ Testing uv requires multiple specific Python versions; they can be installed wit cargo run toolchain install ``` -The storage directory can be configured with `UV_TOOLCHAIN_DIR`. +The storage directory can be configured with `UV_PYTHON_INSTALL_DIR`. ### Local testing diff --git a/Cargo.lock b/Cargo.lock index 318301d86..77fd6798d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,8 +408,8 @@ dependencies = [ "uv-dispatch", "uv-distribution", "uv-git", + "uv-python", "uv-resolver", - "uv-toolchain", "uv-types", ] @@ -4483,12 +4483,12 @@ dependencies = [ "uv-git", "uv-installer", "uv-normalize", + "uv-python", "uv-requirements", "uv-resolver", "uv-scripts", "uv-settings", "uv-tool", - "uv-toolchain", "uv-types", "uv-virtualenv", "uv-warnings", @@ -4543,7 +4543,7 @@ dependencies = [ "tracing", "uv-configuration", "uv-fs", - "uv-toolchain", + "uv-python", "uv-types", "uv-virtualenv", ] @@ -4587,9 +4587,9 @@ dependencies = [ "uv-cache", "uv-configuration", "uv-normalize", + "uv-python", "uv-resolver", "uv-settings", - "uv-toolchain", "uv-version", "uv-warnings", ] @@ -4699,9 +4699,9 @@ dependencies = [ "uv-distribution", "uv-git", "uv-installer", + "uv-python", "uv-resolver", "uv-settings", - "uv-toolchain", "uv-types", "walkdir", ] @@ -4725,8 +4725,8 @@ dependencies = [ "uv-distribution", "uv-git", "uv-installer", + "uv-python", "uv-resolver", - "uv-toolchain", "uv-types", ] @@ -4871,7 +4871,7 @@ dependencies = [ "uv-fs", "uv-git", "uv-normalize", - "uv-toolchain", + "uv-python", "uv-types", "uv-warnings", "walkdir", @@ -4894,6 +4894,52 @@ dependencies = [ "serde", ] +[[package]] +name = "uv-python" +version = "0.0.1" +dependencies = [ + "anyhow", + "assert_fs", + "cache-key", + "clap", + "configparser", + "fs-err", + "futures", + "indoc", + "install-wheel-rs", + "itertools 0.13.0", + "once_cell", + "pep440_rs", + "pep508_rs", + "platform-tags", + "pypi-types", + "regex", + "reqwest", + "reqwest-middleware", + "rmp-serde", + "same-file", + "schemars", + "serde", + "serde_json", + "target-lexicon", + "temp-env", + "tempfile", + "test-log", + "thiserror", + "tokio-util", + "tracing", + "url", + "uv-cache", + "uv-client", + "uv-configuration", + "uv-extract", + "uv-fs", + "uv-state", + "uv-warnings", + "which", + "winapi", +] + [[package]] name = "uv-requirements" version = "0.1.0" @@ -4974,7 +5020,7 @@ dependencies = [ "uv-distribution", "uv-git", "uv-normalize", - "uv-toolchain", + "uv-python", "uv-types", "uv-warnings", ] @@ -5014,8 +5060,8 @@ dependencies = [ "uv-fs", "uv-macros", "uv-normalize", + "uv-python", "uv-resolver", - "uv-toolchain", "uv-warnings", ] @@ -5047,58 +5093,12 @@ dependencies = [ "tracing", "uv-cache", "uv-fs", + "uv-python", "uv-state", - "uv-toolchain", "uv-virtualenv", "uv-warnings", ] -[[package]] -name = "uv-toolchain" -version = "0.0.1" -dependencies = [ - "anyhow", - "assert_fs", - "cache-key", - "clap", - "configparser", - "fs-err", - "futures", - "indoc", - "install-wheel-rs", - "itertools 0.13.0", - "once_cell", - "pep440_rs", - "pep508_rs", - "platform-tags", - "pypi-types", - "regex", - "reqwest", - "reqwest-middleware", - "rmp-serde", - "same-file", - "schemars", - "serde", - "serde_json", - "target-lexicon", - "temp-env", - "tempfile", - "test-log", - "thiserror", - "tokio-util", - "tracing", - "url", - "uv-cache", - "uv-client", - "uv-configuration", - "uv-extract", - "uv-fs", - "uv-state", - "uv-warnings", - "which", - "winapi", -] - [[package]] name = "uv-types" version = "0.0.1" @@ -5116,7 +5116,7 @@ dependencies = [ "uv-configuration", "uv-git", "uv-normalize", - "uv-toolchain", + "uv-python", ] [[package]] @@ -5135,7 +5135,7 @@ dependencies = [ "thiserror", "tracing", "uv-fs", - "uv-toolchain", + "uv-python", "uv-version", ] diff --git a/Cargo.toml b/Cargo.toml index fe3dc1233..ec058a7df 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ uv-scripts = { path = "crates/uv-scripts" } uv-settings = { path = "crates/uv-settings" } uv-state = { path = "crates/uv-state" } uv-tool = { path = "crates/uv-tool" } -uv-toolchain = { path = "crates/uv-toolchain" } +uv-python = { path = "crates/uv-python" } uv-types = { path = "crates/uv-types" } uv-version = { path = "crates/uv-version" } uv-virtualenv = { path = "crates/uv-virtualenv" } diff --git a/crates/README.md b/crates/README.md index 4c128fe52..7302630bc 100644 --- a/crates/README.md +++ b/crates/README.md @@ -89,7 +89,7 @@ Functionality for interacting with Git repositories. Functionality for installing Python packages into a virtual environment. -## [uv-toolchain](./uv-toolchain) +## [uv-python](./uv-python) Functionality for detecting and leveraging the current Python interpreter. diff --git a/crates/bench/Cargo.toml b/crates/bench/Cargo.toml index 8e98d0bba..1383b124a 100644 --- a/crates/bench/Cargo.toml +++ b/crates/bench/Cargo.toml @@ -40,7 +40,7 @@ uv-configuration = { workspace = true } uv-dispatch = { workspace = true } uv-distribution = { workspace = true } uv-git = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-resolver = { workspace = true } uv-types = { workspace = true } diff --git a/crates/bench/benches/uv.rs b/crates/bench/benches/uv.rs index 2019a0171..7af692eb8 100644 --- a/crates/bench/benches/uv.rs +++ b/crates/bench/benches/uv.rs @@ -5,8 +5,8 @@ use bench::criterion::{criterion_group, criterion_main, measurement::WallTime, C use pypi_types::Requirement; use uv_cache::Cache; use uv_client::RegistryClientBuilder; +use uv_python::PythonEnvironment; use uv_resolver::Manifest; -use uv_toolchain::PythonEnvironment; fn resolve_warm_jupyter(c: &mut Criterion) { let runtime = &tokio::runtime::Builder::new_current_thread() @@ -87,11 +87,11 @@ mod resolver { use uv_dispatch::BuildDispatch; use uv_distribution::DistributionDatabase; use uv_git::GitResolver; + use uv_python::PythonEnvironment; use uv_resolver::{ FlatIndex, InMemoryIndex, Manifest, OptionsBuilder, PythonRequirement, ResolutionGraph, Resolver, }; - use uv_toolchain::PythonEnvironment; use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight}; static MARKERS: Lazy = Lazy::new(|| { diff --git a/crates/uv-build/Cargo.toml b/crates/uv-build/Cargo.toml index c31a28669..de0fb312e 100644 --- a/crates/uv-build/Cargo.toml +++ b/crates/uv-build/Cargo.toml @@ -20,7 +20,7 @@ pep508_rs = { workspace = true } pypi-types = { workspace = true } uv-configuration = { workspace = true } uv-fs = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-types = { workspace = true } uv-virtualenv = { workspace = true } diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index 488878bc4..5590befcd 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -31,7 +31,7 @@ use pep508_rs::PackageName; use pypi_types::{Requirement, VerbatimParsedUrl}; use uv_configuration::{BuildKind, ConfigSettings, SetupPyStrategy}; use uv_fs::{rename_with_retry, PythonExt, Simplified}; -use uv_toolchain::{Interpreter, PythonEnvironment}; +use uv_python::{Interpreter, PythonEnvironment}; use uv_types::{BuildContext, BuildIsolation, SourceBuildTrait}; /// e.g. `pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory` diff --git a/crates/uv-cli/Cargo.toml b/crates/uv-cli/Cargo.toml index f6442f34a..0083cacc8 100644 --- a/crates/uv-cli/Cargo.toml +++ b/crates/uv-cli/Cargo.toml @@ -21,7 +21,7 @@ uv-configuration = { workspace = true, features = ["clap"] } uv-normalize = { workspace = true } uv-resolver = { workspace = true, features = ["clap"] } uv-settings = { workspace = true, features = ["schemars"] } -uv-toolchain = { workspace = true, features = ["clap", "schemars"]} +uv-python = { workspace = true, features = ["clap", "schemars"]} uv-version = { workspace = true } uv-warnings = { workspace = true } diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 9734e2ad7..7fb7f4d04 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -12,8 +12,8 @@ use uv_configuration::{ ConfigSettingEntry, IndexStrategy, KeyringProviderType, PackageNameSpecifier, TargetTriple, }; use uv_normalize::{ExtraName, PackageName}; +use uv_python::{PythonFetch, PythonPreference, PythonVersion}; use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode}; -use uv_toolchain::{PythonVersion, ToolchainFetch, ToolchainPreference}; pub mod compat; pub mod options; @@ -118,13 +118,13 @@ pub struct GlobalArgs { #[arg(global = true, long, overrides_with("offline"), hide = true)] pub no_offline: bool, - /// Whether to prefer Python toolchains from uv or on the system. + /// Whether to prefer using Python from uv or on the system. #[arg(global = true, long)] - pub toolchain_preference: Option, + pub python_preference: Option, - /// Whether to automatically download Python toolchains when required. + /// Whether to automatically download Python when required. #[arg(global = true, long)] - pub toolchain_fetch: Option, + pub python_fetch: Option, /// Whether to enable experimental, preview features. #[arg(global = true, long, hide = true, env = "UV_PREVIEW", value_parser = clap::builder::BoolishValueParser::new(), overrides_with("no_preview"))] @@ -173,7 +173,7 @@ pub enum Commands { /// Run and manage executable Python packages. Tool(ToolNamespace), /// Manage Python installations. - Toolchain(ToolchainNamespace), + Python(PythonNamespace), /// Manage Python projects. #[command(flatten)] Project(ProjectCommand), @@ -2020,72 +2020,71 @@ pub struct ToolUninstallArgs { #[derive(Args)] #[allow(clippy::struct_excessive_bools)] -pub struct ToolchainNamespace { +pub struct PythonNamespace { #[command(subcommand)] - pub command: ToolchainCommand, + pub command: PythonCommand, } #[derive(Subcommand)] -pub enum ToolchainCommand { - /// List the available toolchains. - List(ToolchainListArgs), +pub enum PythonCommand { + /// List the available Python installations. + List(PythonListArgs), - /// Download and install toolchains. - Install(ToolchainInstallArgs), + /// Download and install Python versions. + Install(PythonInstallArgs), - /// Search for a toolchain. - #[command(disable_version_flag = true)] - Find(ToolchainFindArgs), + /// Search for a Python installation. + Find(PythonFindArgs), - /// Show the toolchains directory. + /// Show the uv Python installation directory. Dir, - /// Uninstall toolchains. - Uninstall(ToolchainUninstallArgs), + /// Uninstall Python versions. + Uninstall(PythonUninstallArgs), } #[derive(Args)] #[allow(clippy::struct_excessive_bools)] -pub struct ToolchainListArgs { - /// List all toolchain versions, including outdated patch versions. +pub struct PythonListArgs { + /// List all Python versions, including outdated patch versions. #[arg(long)] pub all_versions: bool, - /// List toolchains for all platforms. + /// List Python installations for all platforms. #[arg(long)] pub all_platforms: bool, - /// Only show installed toolchains, exclude available downloads. + /// Only show installed Python versions, exclude available downloads. #[arg(long)] pub only_installed: bool, } #[derive(Args)] #[allow(clippy::struct_excessive_bools)] -pub struct ToolchainInstallArgs { - /// The toolchains to install. +pub struct PythonInstallArgs { + /// The Python versions to install. /// - /// If not provided, the requested toolchain(s) will be read from the `.python-versions` + /// If not provided, the requested Python version(s) will be read from the `.python-versions` /// or `.python-version` files. If neither file is present, uv will check if it has - /// installed any toolchains. If not, it will install the latest stable version of Python. + /// installed any Python versions. If not, it will install the latest stable version of Python. pub targets: Vec, - /// Force the installation of the toolchain, even if it is already installed. + /// Force the installation of the requested Python, even if it is already installed. #[arg(long, short)] pub force: bool, } #[derive(Args)] #[allow(clippy::struct_excessive_bools)] -pub struct ToolchainUninstallArgs { - /// The toolchains to uninstall. +pub struct PythonUninstallArgs { + /// The Python versions to uninstall. pub targets: Vec, } #[derive(Args)] #[allow(clippy::struct_excessive_bools)] -pub struct ToolchainFindArgs { - /// The toolchain request. +pub struct PythonFindArgs { + /// The Python request. pub request: Option, } diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index 00cd34e05..a6820a067 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -31,7 +31,7 @@ uv-git = { workspace = true } uv-installer = { workspace = true } uv-resolver = { workspace = true } uv-settings = { workspace = true, features = ["schemars"] } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-types = { workspace = true } # Any dependencies that are exclusively used in `uv-dev` should be listed as non-workspace diff --git a/crates/uv-dev/src/build.rs b/crates/uv-dev/src/build.rs index 6b7857965..af7d3ca80 100644 --- a/crates/uv-dev/src/build.rs +++ b/crates/uv-dev/src/build.rs @@ -16,8 +16,8 @@ use uv_configuration::{ }; use uv_dispatch::BuildDispatch; use uv_git::GitResolver; +use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; use uv_resolver::{FlatIndex, InMemoryIndex}; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment, ToolchainRequest}; use uv_types::{BuildContext, BuildIsolation, InFlight}; #[derive(Parser)] @@ -68,8 +68,8 @@ pub(crate) async fn build(args: BuildArgs) -> Result { let index_urls = IndexLocations::default(); let index_strategy = IndexStrategy::default(); let setup_py = SetupPyStrategy::default(); - let toolchain = PythonEnvironment::find( - &ToolchainRequest::default(), + let python = PythonEnvironment::find( + &PythonRequest::default(), EnvironmentPreference::OnlyVirtual, &cache, )?; @@ -78,7 +78,7 @@ pub(crate) async fn build(args: BuildArgs) -> Result { let build_dispatch = BuildDispatch::new( &client, &cache, - toolchain.interpreter(), + python.interpreter(), &index_urls, &flat_index, &index, diff --git a/crates/uv-dev/src/compile.rs b/crates/uv-dev/src/compile.rs index 380802e52..5701c3f1e 100644 --- a/crates/uv-dev/src/compile.rs +++ b/crates/uv-dev/src/compile.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use clap::Parser; use tracing::info; use uv_cache::{Cache, CacheArgs}; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment, ToolchainRequest}; +use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; #[derive(Parser)] pub(crate) struct CompileArgs { @@ -21,7 +21,7 @@ pub(crate) async fn compile(args: CompileArgs) -> anyhow::Result<()> { python } else { let interpreter = PythonEnvironment::find( - &ToolchainRequest::default(), + &PythonRequest::default(), EnvironmentPreference::OnlyVirtual, &cache, )? diff --git a/crates/uv-dispatch/Cargo.toml b/crates/uv-dispatch/Cargo.toml index df4b61c8c..e8994bdc1 100644 --- a/crates/uv-dispatch/Cargo.toml +++ b/crates/uv-dispatch/Cargo.toml @@ -24,7 +24,7 @@ uv-configuration = { workspace = true } uv-distribution = { workspace = true } uv-git = { workspace = true } uv-installer = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-resolver = { workspace = true } uv-types = { workspace = true } diff --git a/crates/uv-dispatch/src/lib.rs b/crates/uv-dispatch/src/lib.rs index 89fa0c837..f424b2934 100644 --- a/crates/uv-dispatch/src/lib.rs +++ b/crates/uv-dispatch/src/lib.rs @@ -23,10 +23,10 @@ use uv_configuration::{Concurrency, PreviewMode}; use uv_distribution::DistributionDatabase; use uv_git::GitResolver; use uv_installer::{Installer, Plan, Planner, Preparer, SitePackages}; +use uv_python::{Interpreter, PythonEnvironment}; use uv_resolver::{ ExcludeNewer, FlatIndex, InMemoryIndex, Manifest, OptionsBuilder, PythonRequirement, Resolver, }; -use uv_toolchain::{Interpreter, PythonEnvironment}; use uv_types::{BuildContext, BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight}; /// The main implementation of [`BuildContext`], used by the CLI, see [`BuildContext`] diff --git a/crates/uv-installer/Cargo.toml b/crates/uv-installer/Cargo.toml index 0c36bbff6..64565d769 100644 --- a/crates/uv-installer/Cargo.toml +++ b/crates/uv-installer/Cargo.toml @@ -27,7 +27,7 @@ uv-distribution = { workspace = true } uv-extract = { workspace = true } uv-fs = { workspace = true } uv-git = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-normalize = { workspace = true } uv-types = { workspace = true } uv-warnings = { workspace = true } diff --git a/crates/uv-installer/src/installer.rs b/crates/uv-installer/src/installer.rs index 03f5cab09..2d0003bd6 100644 --- a/crates/uv-installer/src/installer.rs +++ b/crates/uv-installer/src/installer.rs @@ -3,7 +3,7 @@ use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use tracing::instrument; use distribution_types::CachedDist; -use uv_toolchain::PythonEnvironment; +use uv_python::PythonEnvironment; pub struct Installer<'a> { venv: &'a PythonEnvironment, diff --git a/crates/uv-installer/src/plan.rs b/crates/uv-installer/src/plan.rs index 569966898..6129d9bfd 100644 --- a/crates/uv-installer/src/plan.rs +++ b/crates/uv-installer/src/plan.rs @@ -21,7 +21,7 @@ use uv_distribution::{ }; use uv_fs::Simplified; use uv_git::GitUrl; -use uv_toolchain::PythonEnvironment; +use uv_python::PythonEnvironment; use uv_types::HashStrategy; use crate::satisfies::RequirementSatisfaction; diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index c4f18be01..84d31b3d5 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -13,7 +13,7 @@ use distribution_types::{ use pep440_rs::{Version, VersionSpecifiers}; use pypi_types::{Requirement, VerbatimParsedUrl}; use uv_normalize::PackageName; -use uv_toolchain::PythonEnvironment; +use uv_python::PythonEnvironment; use uv_types::InstalledPackagesProvider; use crate::satisfies::RequirementSatisfaction; diff --git a/crates/uv-toolchain/Cargo.toml b/crates/uv-python/Cargo.toml similarity index 98% rename from crates/uv-toolchain/Cargo.toml rename to crates/uv-python/Cargo.toml index 096e13afb..3a7d2e5fe 100644 --- a/crates/uv-toolchain/Cargo.toml +++ b/crates/uv-python/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uv-toolchain" +name = "uv-python" version = "0.0.1" edition = { workspace = true } rust-version = { workspace = true } diff --git a/crates/uv-toolchain/download-metadata.json b/crates/uv-python/download-metadata.json similarity index 100% rename from crates/uv-toolchain/download-metadata.json rename to crates/uv-python/download-metadata.json diff --git a/crates/uv-toolchain/fetch-download-metadata.py b/crates/uv-python/fetch-download-metadata.py similarity index 100% rename from crates/uv-toolchain/fetch-download-metadata.py rename to crates/uv-python/fetch-download-metadata.py diff --git a/crates/uv-toolchain/python/__init__.py b/crates/uv-python/python/__init__.py similarity index 100% rename from crates/uv-toolchain/python/__init__.py rename to crates/uv-python/python/__init__.py diff --git a/crates/uv-toolchain/python/get_interpreter_info.py b/crates/uv-python/python/get_interpreter_info.py similarity index 100% rename from crates/uv-toolchain/python/get_interpreter_info.py rename to crates/uv-python/python/get_interpreter_info.py diff --git a/crates/uv-toolchain/python/packaging/LICENSE.APACHE b/crates/uv-python/python/packaging/LICENSE.APACHE similarity index 100% rename from crates/uv-toolchain/python/packaging/LICENSE.APACHE rename to crates/uv-python/python/packaging/LICENSE.APACHE diff --git a/crates/uv-toolchain/python/packaging/LICENSE.BSD b/crates/uv-python/python/packaging/LICENSE.BSD similarity index 100% rename from crates/uv-toolchain/python/packaging/LICENSE.BSD rename to crates/uv-python/python/packaging/LICENSE.BSD diff --git a/crates/uv-toolchain/python/packaging/README.md b/crates/uv-python/python/packaging/README.md similarity index 100% rename from crates/uv-toolchain/python/packaging/README.md rename to crates/uv-python/python/packaging/README.md diff --git a/crates/uv-toolchain/python/packaging/__init__.py b/crates/uv-python/python/packaging/__init__.py similarity index 100% rename from crates/uv-toolchain/python/packaging/__init__.py rename to crates/uv-python/python/packaging/__init__.py diff --git a/crates/uv-toolchain/python/packaging/_elffile.py b/crates/uv-python/python/packaging/_elffile.py similarity index 100% rename from crates/uv-toolchain/python/packaging/_elffile.py rename to crates/uv-python/python/packaging/_elffile.py diff --git a/crates/uv-toolchain/python/packaging/_manylinux.py b/crates/uv-python/python/packaging/_manylinux.py similarity index 100% rename from crates/uv-toolchain/python/packaging/_manylinux.py rename to crates/uv-python/python/packaging/_manylinux.py diff --git a/crates/uv-toolchain/python/packaging/_musllinux.py b/crates/uv-python/python/packaging/_musllinux.py similarity index 100% rename from crates/uv-toolchain/python/packaging/_musllinux.py rename to crates/uv-python/python/packaging/_musllinux.py diff --git a/crates/uv-toolchain/src/discovery.rs b/crates/uv-python/src/discovery.rs similarity index 78% rename from crates/uv-toolchain/src/discovery.rs rename to crates/uv-python/src/discovery.rs index ca9813184..e287abcb4 100644 --- a/crates/uv-toolchain/src/discovery.rs +++ b/crates/uv-python/src/discovery.rs @@ -17,22 +17,22 @@ use uv_warnings::warn_user_once; use crate::downloads::PythonDownloadRequest; use crate::implementation::{ImplementationName, LenientImplementationName}; +use crate::installation::PythonInstallation; use crate::interpreter::Error as InterpreterError; -use crate::managed::InstalledToolchains; +use crate::managed::ManagedPythonInstallations; use crate::py_launcher::{self, py_list_paths}; -use crate::toolchain::Toolchain; use crate::virtualenv::{ conda_prefix_from_env, virtualenv_from_env, virtualenv_from_working_dir, virtualenv_python_executable, }; use crate::{Interpreter, PythonVersion}; -/// A request to find a Python toolchain. +/// A request to find a Python installation. /// -/// See [`ToolchainRequest::from_str`]. +/// See [`PythonRequest::from_str`]. #[derive(Debug, Clone, PartialEq, Eq, Default)] -pub enum ToolchainRequest { - /// Use any discovered Python toolchain +pub enum PythonRequest { + /// Use any discovered Python installation #[default] Any, /// A Python version without an implementation name e.g. `3.10` or `>=3.12,<3.13` @@ -47,8 +47,8 @@ pub enum ToolchainRequest { Implementation(ImplementationName), /// A Python implementation name and version e.g. `pypy3.8` or `pypy@3.8` or `pp38` ImplementationVersion(ImplementationName, VersionRequest), - /// A request for a specific toolchain key e.g. `cpython-3.12-x86_64-linux-gnu` - /// Generally these refer to uv-managed toolchain downloads. + /// A request for a specific Python installation key e.g. `cpython-3.12-x86_64-linux-gnu` + /// Generally these refer to managed Python downloads. Key(PythonDownloadRequest), } @@ -56,21 +56,21 @@ pub enum ToolchainRequest { #[serde(deny_unknown_fields, rename_all = "kebab-case")] #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum ToolchainPreference { - /// Only use managed toolchains; never use system toolchains. +pub enum PythonPreference { + /// Only use managed Python installations; never use system Python installations. OnlyManaged, - /// Prefer installed toolchains, only download managed toolchains if no system toolchain is found. + /// Prefer installed Python installations, only download managed Python installations if no system Python installation is found. /// - /// Installed managed toolchains are still preferred over system toolchains. + /// Installed managed Python installations are still preferred over system Python installations. #[default] Installed, - /// Prefer managed toolchains over system toolchains, even if fetching is required. + /// Prefer managed Python installations over system Python installations, even if fetching is required. Managed, - /// Prefer system toolchains over managed toolchains. + /// Prefer system Python installations over managed Python installations. /// - /// If a system toolchain cannot be found, a managed toolchain can be used. + /// If a system Python installation cannot be found, a managed Python installation can be used. System, - /// Only use system toolchains; never use managed toolchains. + /// Only use system Python installations; never use managed Python installations. OnlySystem, } @@ -78,11 +78,11 @@ pub enum ToolchainPreference { #[serde(deny_unknown_fields, rename_all = "kebab-case")] #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum ToolchainFetch { - /// Automatically fetch managed toolchains when needed. +pub enum PythonFetch { + /// Automatically fetch managed Python installations when needed. #[default] Automatic, - /// Do not automatically fetch managed toolchains; require explicit installation. + /// Do not automatically fetch managed Python installations; require explicit installation. Manual, } @@ -99,7 +99,7 @@ pub enum EnvironmentPreference { Any, } -/// A Python toolchain version request. +/// A Python discovery version request. #[derive(Clone, Debug, Default, PartialEq, Eq)] pub enum VersionRequest { #[default] @@ -110,38 +110,24 @@ pub enum VersionRequest { Range(VersionSpecifiers), } -/// The policy for discovery of "system" Python interpreters. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] -pub enum SystemPython { - /// Only allow a system Python if passed directly i.e. via [`ToolchainSource::ProvidedPath`] or [`ToolchainSource::ParentInterpreter`] - #[default] - Explicit, - /// Do not allow a system Python - Disallowed, - /// Allow a system Python to be used if no virtual environment is active. - Allowed, - /// Ignore virtual environments and require a system Python. - Required, -} - -/// The result of an toolchain search. +/// The result of an Python installation search. /// -/// Returned by [`find_toolchain`]. -type ToolchainResult = Result; +/// Returned by [`find_python_installation`]. +type FindPythonResult = Result; -/// The result of failed toolchain discovery. +/// The result of failed Python installation discovery. /// -/// See [`ToolchainResult`]. +/// See [`FindPythonResult`]. #[derive(Clone, Debug, Error)] -pub struct ToolchainNotFound { - pub request: ToolchainRequest, - pub toolchain_preference: ToolchainPreference, +pub struct PythonNotFound { + pub request: PythonRequest, + pub python_preference: PythonPreference, pub environment_preference: EnvironmentPreference, } -/// A location for discovery of a Python toolchain. +/// A location for discovery of a Python installation or interpreter. #[derive(Debug, Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord)] -pub enum ToolchainSource { +pub enum PythonSource { /// The path was provided directly ProvidedPath, /// An environment was active e.g. via `VIRTUAL_ENV` @@ -154,9 +140,9 @@ pub enum ToolchainSource { SearchPath, /// An executable was found via the `py` launcher PyLauncher, - /// The toolchain was found in the uv toolchain directory + /// The Python installation was found in the uv managed Python directory Managed, - /// The toolchain was found via the invoking interpreter i.e. via `python -m uv ...` + /// The Python installation was found via the invoking interpreter i.e. via `python -m uv ...` ParentInterpreter, } @@ -169,9 +155,9 @@ pub enum Error { #[error(transparent)] Query(#[from] crate::interpreter::Error), - /// An error was encountered when interacting with a managed toolchain. + /// An error was encountered when interacting with a managed Python installation. #[error(transparent)] - ManagedToolchain(#[from] crate::managed::Error), + ManagedPython(#[from] crate::managed::Error), /// An error was encountered when inspecting a virtual environment. #[error(transparent)] @@ -187,7 +173,7 @@ pub enum Error { // TODO(zanieb): Is this error case necessary still? We should probably drop it. #[error("Interpreter discovery for `{0}` requires `{1}` but only {2} is allowed")] - SourceNotAllowed(ToolchainRequest, ToolchainSource, ToolchainPreference), + SourceNotAllowed(PythonRequest, PythonSource, PythonPreference), } /// Lazily iterate over Python executables in mutable environments. @@ -201,11 +187,11 @@ pub enum Error { /// /// Notably, "system" environments are excluded. See [`python_executables_from_installed`]. fn python_executables_from_environments<'a>( -) -> impl Iterator> + 'a { +) -> impl Iterator> + 'a { let from_parent_interpreter = std::iter::once_with(|| { std::env::var_os("UV_INTERNAL__PARENT_INTERPRETER") .into_iter() - .map(|path| Ok((ToolchainSource::ParentInterpreter, PathBuf::from(path)))) + .map(|path| Ok((PythonSource::ParentInterpreter, PathBuf::from(path)))) }) .flatten(); @@ -213,7 +199,7 @@ fn python_executables_from_environments<'a>( virtualenv_from_env() .into_iter() .map(virtualenv_python_executable) - .map(|path| Ok((ToolchainSource::ActiveEnvironment, path))) + .map(|path| Ok((PythonSource::ActiveEnvironment, path))) }) .flatten(); @@ -221,7 +207,7 @@ fn python_executables_from_environments<'a>( conda_prefix_from_env() .into_iter() .map(virtualenv_python_executable) - .map(|path| Ok((ToolchainSource::CondaPrefix, path))) + .map(|path| Ok((PythonSource::CondaPrefix, path))) }) .flatten(); @@ -229,7 +215,7 @@ fn python_executables_from_environments<'a>( virtualenv_from_working_dir() .map(|path| { path.map(virtualenv_python_executable) - .map(|path| (ToolchainSource::DiscoveredEnvironment, path)) + .map(|path| (PythonSource::DiscoveredEnvironment, path)) .into_iter() }) .map_err(Error::from) @@ -246,52 +232,52 @@ fn python_executables_from_environments<'a>( /// /// The following sources are supported: /// -/// - Managed toolchains (e.g. `uv toolchain install`) +/// - Managed Python installations (e.g. `uv python install`) /// - The search path (i.e. `PATH`) /// - The `py` launcher (Windows only) /// -/// The ordering and presence of each source is determined by the [`ToolchainPreference`]. +/// The ordering and presence of each source is determined by the [`PythonPreference`]. /// /// If a [`VersionRequest`] is provided, we will skip executables that we know do not satisfy the request /// and (as discussed in [`python_executables_from_search_path`]) additional version-specific executables may /// be included. However, the caller MUST query the returned executables to ensure they satisfy the request; /// this function does not guarantee that the executables provide any particular version. See -/// [`find_toolchain`] instead. +/// [`find_python_installation`] instead. /// /// This function does not guarantee that the executables are valid Python interpreters. /// See [`python_interpreters_from_executables`]. fn python_executables_from_installed<'a>( version: Option<&'a VersionRequest>, implementation: Option<&'a ImplementationName>, - preference: ToolchainPreference, -) -> Box> + 'a> { - let from_managed_toolchains = std::iter::once_with(move || { - InstalledToolchains::from_settings() + preference: PythonPreference, +) -> Box> + 'a> { + let from_managed_installations = std::iter::once_with(move || { + ManagedPythonInstallations::from_settings() .map_err(Error::from) - .and_then(|installed_toolchains| { + .and_then(|installed_installations| { debug!( - "Searching for managed toolchains at `{}`", - installed_toolchains.root().user_display() + "Searching for managed installations at `{}`", + installed_installations.root().user_display() ); - let toolchains = installed_toolchains.find_matching_current_platform()?; - // Check that the toolchain version satisfies the request to avoid unnecessary interpreter queries later - Ok(toolchains + let installations = installed_installations.find_matching_current_platform()?; + // Check that the Python version satisfies the request to avoid unnecessary interpreter queries later + Ok(installations .into_iter() - .filter(move |toolchain| { + .filter(move |installation| { version.is_none() || version.is_some_and(|version| { - version.matches_version(&toolchain.version()) + version.matches_version(&installation.version()) }) }) - .inspect(|toolchain| debug!("Found managed toolchain `{toolchain}`")) - .map(|toolchain| (ToolchainSource::Managed, toolchain.executable()))) + .inspect(|installation| debug!("Found managed Python `{installation}`")) + .map(|installation| (PythonSource::Managed, installation.executable()))) }) }) .flatten_ok(); let from_search_path = std::iter::once_with(move || { python_executables_from_search_path(version, implementation) - .map(|path| Ok((ToolchainSource::SearchPath, path))) + .map(|path| Ok((PythonSource::SearchPath, path))) }) .flatten(); @@ -307,7 +293,7 @@ fn python_executables_from_installed<'a>( version.has_patch() || version.matches_major_minor(entry.major, entry.minor) ) ) - .map(|entry| (ToolchainSource::PyLauncher, entry.executable_path))) + .map(|entry| (PythonSource::PyLauncher, entry.executable_path))) .map_err(Error::from) }) .into_iter() @@ -316,24 +302,24 @@ fn python_executables_from_installed<'a>( .flatten(); match preference { - ToolchainPreference::OnlyManaged => Box::new(from_managed_toolchains), - ToolchainPreference::Managed | ToolchainPreference::Installed => Box::new( - from_managed_toolchains + PythonPreference::OnlyManaged => Box::new(from_managed_installations), + PythonPreference::Managed | PythonPreference::Installed => Box::new( + from_managed_installations .chain(from_search_path) .chain(from_py_launcher), ), - ToolchainPreference::System => Box::new( + PythonPreference::System => Box::new( from_search_path .chain(from_py_launcher) - .chain(from_managed_toolchains), + .chain(from_managed_installations), ), - ToolchainPreference::OnlySystem => Box::new(from_search_path.chain(from_py_launcher)), + PythonPreference::OnlySystem => Box::new(from_search_path.chain(from_py_launcher)), } } /// Lazily iterate over all discoverable Python executables. /// -/// Note that Python executables may be excluded by the given [`EnvironmentPreference`] and [`ToolchainPreference`]. +/// Note that Python executables may be excluded by the given [`EnvironmentPreference`] and [`PythonPreference`]. /// /// See [`python_executables_from_installed`] and [`python_executables_from_environments`] /// for more information on discovery. @@ -341,8 +327,8 @@ fn python_executables<'a>( version: Option<&'a VersionRequest>, implementation: Option<&'a ImplementationName>, environments: EnvironmentPreference, - preference: ToolchainPreference, -) -> Box> + 'a> { + preference: PythonPreference, +) -> Box> + 'a> { let from_environments = python_executables_from_environments(); let from_installed = python_executables_from_installed(version, implementation, preference); @@ -426,16 +412,16 @@ fn python_executables_from_search_path<'a>( /// Lazily iterate over all discoverable Python interpreters. /// -/// Note interpreters may be excluded by the given [`EnvironmentPreference`] and [`ToolchainPreference`]. +/// Note interpreters may be excluded by the given [`EnvironmentPreference`] and [`PythonPreference`]. /// /// See [`python_executables`] for more information on discovery. fn python_interpreters<'a>( version: Option<&'a VersionRequest>, implementation: Option<&'a ImplementationName>, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &'a Cache, -) -> impl Iterator> + 'a { +) -> impl Iterator> + 'a { python_interpreters_from_executables( python_executables(version, implementation, environments, preference), cache, @@ -445,9 +431,9 @@ fn python_interpreters<'a>( /// Lazily convert Python executables into interpreters. fn python_interpreters_from_executables<'a>( - executables: impl Iterator> + 'a, + executables: impl Iterator> + 'a, cache: &'a Cache, -) -> impl Iterator> + 'a { +) -> impl Iterator> + 'a { executables.map(|result| match result { Ok((source, path)) => Interpreter::query(&path, cache) .map(|interpreter| (source, interpreter)) @@ -465,16 +451,16 @@ fn python_interpreters_from_executables<'a>( }) } -/// Returns true if a interpreter matches the [`EnvironmentPreference`]. +/// Returns true if a Python interpreter matches the [`EnvironmentPreference`]. fn satisfies_environment_preference( - source: ToolchainSource, + source: PythonSource, interpreter: &Interpreter, preference: EnvironmentPreference, ) -> bool { match ( preference, // Conda environments are not conformant virtual environments but we treat them as such - interpreter.is_virtualenv() || matches!(source, ToolchainSource::CondaPrefix), + interpreter.is_virtualenv() || matches!(source, PythonSource::CondaPrefix), ) { (EnvironmentPreference::Any, _) => true, (EnvironmentPreference::OnlyVirtual, true) => true, @@ -489,7 +475,7 @@ fn satisfies_environment_preference( (EnvironmentPreference::ExplicitSystem, false) => { if matches!( source, - ToolchainSource::ProvidedPath | ToolchainSource::ParentInterpreter + PythonSource::ProvidedPath | PythonSource::ParentInterpreter ) { debug!( "Allowing explicitly requested system Python interpreter at `{}`", @@ -517,7 +503,7 @@ fn satisfies_environment_preference( /// Utility for applying [`satisfies_environment_preference`] to a result type. fn result_satisfies_environment_preference( - result: &Result<(ToolchainSource, Interpreter), Error>, + result: &Result<(PythonSource, Interpreter), Error>, preference: EnvironmentPreference, ) -> bool { result.as_ref().ok().map_or(true, |(source, interpreter)| { @@ -527,12 +513,12 @@ fn result_satisfies_environment_preference( /// Check if an encountered error is critical and should stop discovery. /// -/// Returns false when an error could be due to a faulty toolchain and we should continue searching for a working one. +/// Returns false when an error could be due to a faulty Python installation and we should continue searching for a working one. impl Error { pub fn is_critical(&self) -> bool { match self { - // When querying the toolchain interpreter fails, we will only raise errors that demonstrate that something is broken - // If the toolchain interpreter returned a bad response, we'll continue searching for one that works + // When querying the Python interpreter fails, we will only raise errors that demonstrate that something is broken + // If the Python interpreter returned a bad response, we'll continue searching for one that works Error::Query(err) => match err { InterpreterError::Encode(_) | InterpreterError::Io(_) @@ -558,23 +544,25 @@ impl Error { } } -fn find_toolchain_at_file( +/// Create a [`PythonInstallation`] from a Python interpreter path. +fn python_installation_from_executable( path: &PathBuf, cache: &Cache, -) -> Result { - Ok(Toolchain { - source: ToolchainSource::ProvidedPath, +) -> Result { + Ok(PythonInstallation { + source: PythonSource::ProvidedPath, interpreter: Interpreter::query(path, cache)?, }) } -fn find_toolchain_at_directory( +/// Create a [`PythonInstallation`] from a Python installation root directory. +fn python_installation_from_directory( path: &PathBuf, cache: &Cache, -) -> Result { +) -> Result { let executable = virtualenv_python_executable(path); - Ok(Toolchain { - source: ToolchainSource::ProvidedPath, + Ok(PythonInstallation { + source: PythonSource::ProvidedPath, interpreter: Interpreter::query(executable, cache)?, }) } @@ -583,32 +571,32 @@ fn find_toolchain_at_directory( fn python_interpreters_with_executable_name<'a>( name: &'a str, cache: &'a Cache, -) -> impl Iterator> + 'a { +) -> impl Iterator> + 'a { python_interpreters_from_executables( which_all(name) .into_iter() - .flat_map(|inner| inner.map(|path| Ok((ToolchainSource::SearchPath, path)))), + .flat_map(|inner| inner.map(|path| Ok((PythonSource::SearchPath, path)))), cache, ) } -/// Iterate over all toolchains that satisfy the given request. -pub fn find_toolchains<'a>( - request: &'a ToolchainRequest, +/// Iterate over all Python installations that satisfy the given request. +pub fn find_python_installations<'a>( + request: &'a PythonRequest, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &'a Cache, -) -> Box> + 'a> { +) -> Box> + 'a> { match request { - ToolchainRequest::File(path) => Box::new(std::iter::once({ - if preference.allows(ToolchainSource::ProvidedPath) { + PythonRequest::File(path) => Box::new(std::iter::once({ + if preference.allows(PythonSource::ProvidedPath) { debug!("Checking for Python interpreter at {request}"); - match find_toolchain_at_file(path, cache) { - Ok(toolchain) => Ok(ToolchainResult::Ok(toolchain)), + match python_installation_from_executable(path, cache) { + Ok(installation) => Ok(FindPythonResult::Ok(installation)), Err(InterpreterError::NotFound(_)) => { - Ok(ToolchainResult::Err(ToolchainNotFound { + Ok(FindPythonResult::Err(PythonNotFound { request: request.clone(), - toolchain_preference: preference, + python_preference: preference, environment_preference: environments, })) } @@ -617,21 +605,21 @@ pub fn find_toolchains<'a>( } else { Err(Error::SourceNotAllowed( request.clone(), - ToolchainSource::ProvidedPath, + PythonSource::ProvidedPath, preference, )) } })), - ToolchainRequest::Directory(path) => Box::new(std::iter::once({ + PythonRequest::Directory(path) => Box::new(std::iter::once({ debug!("Checking for Python interpreter in {request}"); - if preference.allows(ToolchainSource::ProvidedPath) { + if preference.allows(PythonSource::ProvidedPath) { debug!("Checking for Python interpreter at {request}"); - match find_toolchain_at_directory(path, cache) { - Ok(toolchain) => Ok(ToolchainResult::Ok(toolchain)), + match python_installation_from_directory(path, cache) { + Ok(installation) => Ok(FindPythonResult::Ok(installation)), Err(InterpreterError::NotFound(_)) => { - Ok(ToolchainResult::Err(ToolchainNotFound { + Ok(FindPythonResult::Err(PythonNotFound { request: request.clone(), - toolchain_preference: preference, + python_preference: preference, environment_preference: environments, })) } @@ -640,42 +628,52 @@ pub fn find_toolchains<'a>( } else { Err(Error::SourceNotAllowed( request.clone(), - ToolchainSource::ProvidedPath, + PythonSource::ProvidedPath, preference, )) } })), - ToolchainRequest::ExecutableName(name) => { + PythonRequest::ExecutableName(name) => { debug!("Searching for Python interpreter with {request}"); - if preference.allows(ToolchainSource::SearchPath) { + if preference.allows(PythonSource::SearchPath) { debug!("Checking for Python interpreter at {request}"); Box::new( - python_interpreters_with_executable_name(name, cache) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)), + python_interpreters_with_executable_name(name, cache).map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }), ) } else { Box::new(std::iter::once(Err(Error::SourceNotAllowed( request.clone(), - ToolchainSource::SearchPath, + PythonSource::SearchPath, preference, )))) } } - ToolchainRequest::Any => Box::new({ + PythonRequest::Any => Box::new({ debug!("Searching for Python interpreter in {preference}"); - python_interpreters(None, None, environments, preference, cache) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)) + python_interpreters(None, None, environments, preference, cache).map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }) }), - ToolchainRequest::Version(version) => Box::new({ + PythonRequest::Version(version) => Box::new({ debug!("Searching for {request} in {preference}"); python_interpreters(Some(version), None, environments, preference, cache) .filter(|result| match result { Err(_) => true, Ok((_source, interpreter)) => version.matches_interpreter(interpreter), }) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)) + .map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }) }), - ToolchainRequest::Implementation(implementation) => Box::new({ + PythonRequest::Implementation(implementation) => Box::new({ debug!("Searching for a {request} interpreter in {preference}"); python_interpreters(None, Some(implementation), environments, preference, cache) .filter(|result| match result { @@ -684,9 +682,13 @@ pub fn find_toolchains<'a>( .implementation_name() .eq_ignore_ascii_case(implementation.into()), }) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)) + .map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }) }), - ToolchainRequest::ImplementationVersion(implementation, version) => Box::new({ + PythonRequest::ImplementationVersion(implementation, version) => Box::new({ debug!("Searching for {request} in {preference}"); python_interpreters( Some(version), @@ -704,9 +706,13 @@ pub fn find_toolchains<'a>( .eq_ignore_ascii_case(implementation.into()) } }) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)) + .map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }) }), - ToolchainRequest::Key(request) => Box::new({ + PythonRequest::Key(request) => Box::new({ debug!("Searching for {request} in {preference}"); python_interpreters( request.version(), @@ -719,98 +725,99 @@ pub fn find_toolchains<'a>( Err(_) => true, Ok((_source, interpreter)) => request.satisfied_by_interpreter(interpreter), }) - .map(|result| result.map(Toolchain::from_tuple).map(ToolchainResult::Ok)) + .map(|result| { + result + .map(PythonInstallation::from_tuple) + .map(FindPythonResult::Ok) + }) }), } } -/// Find a toolchain that satisfies the given request. +/// Find a Python installation that satisfies the given request. /// -/// If an error is encountered while locating or inspecting a candidate toolchain, +/// If an error is encountered while locating or inspecting a candidate installation, /// the error will raised instead of attempting further candidates. -pub(crate) fn find_toolchain( - request: &ToolchainRequest, +pub(crate) fn find_python_installation( + request: &PythonRequest, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &Cache, -) -> Result { - let mut toolchains = find_toolchains(request, environments, preference, cache); - if let Some(result) = toolchains.find(|result| { - // Return the first critical discovery error or toolchain result +) -> Result { + let mut installations = find_python_installations(request, environments, preference, cache); + if let Some(result) = installations.find(|result| { + // Return the first critical discovery error or result result.as_ref().err().map_or(true, Error::is_critical) }) { result } else { - Ok(ToolchainResult::Err(ToolchainNotFound { + Ok(FindPythonResult::Err(PythonNotFound { request: request.clone(), environment_preference: environments, - toolchain_preference: preference, + python_preference: preference, })) } } -/// Find the best-matching Python toolchain. +/// Find the best-matching Python installation. /// -/// If no Python version is provided, we will use the first available toolchain. +/// If no Python version is provided, we will use the first available installation. /// /// If a Python version is provided, we will first try to find an exact match. If /// that cannot be found and a patch version was requested, we will look for a match /// without comparing the patch version number. If that cannot be found, we fall back to /// the first available version. /// -/// See [`find_toolchain`] for more details on toolchain discovery. +/// See [`find_python_installation`] for more details on installation discovery. #[instrument(skip_all, fields(request))] -pub fn find_best_toolchain( - request: &ToolchainRequest, +pub fn find_best_python_installation( + request: &PythonRequest, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &Cache, -) -> Result { - debug!("Starting toolchain discovery for {}", request); +) -> Result { + debug!("Starting Python discovery for {}", request); // First, check for an exact match (or the first available version if no Python versfion was provided) debug!("Looking for exact match for request {request}"); - let result = find_toolchain(request, environments, preference, cache)?; - if let Ok(ref toolchain) = result { - warn_on_unsupported_python(toolchain.interpreter()); + let result = find_python_installation(request, environments, preference, cache)?; + if let Ok(ref installation) = result { + warn_on_unsupported_python(installation.interpreter()); return Ok(result); } // If that fails, and a specific patch version was requested try again allowing a // different patch version if let Some(request) = match request { - ToolchainRequest::Version(version) => { + PythonRequest::Version(version) => { if version.has_patch() { - Some(ToolchainRequest::Version(version.clone().without_patch())) + Some(PythonRequest::Version(version.clone().without_patch())) } else { None } } - ToolchainRequest::ImplementationVersion(implementation, version) => { - Some(ToolchainRequest::ImplementationVersion( - *implementation, - version.clone().without_patch(), - )) - } + PythonRequest::ImplementationVersion(implementation, version) => Some( + PythonRequest::ImplementationVersion(*implementation, version.clone().without_patch()), + ), _ => None, } { debug!("Looking for relaxed patch version {request}"); - let result = find_toolchain(&request, environments, preference, cache)?; - if let Ok(ref toolchain) = result { - warn_on_unsupported_python(toolchain.interpreter()); + let result = find_python_installation(&request, environments, preference, cache)?; + if let Ok(ref installation) = result { + warn_on_unsupported_python(installation.interpreter()); return Ok(result); } } // If a Python version was requested but cannot be fulfilled, just take any version - debug!("Looking for Python toolchain with any version"); - let request = ToolchainRequest::Any; + debug!("Looking for Python installation with any version"); + let request = PythonRequest::Any; Ok( - find_toolchain(&request, environments, preference, cache)?.map_err(|err| { + find_python_installation(&request, environments, preference, cache)?.map_err(|err| { // Use a more general error in this case since we looked for multiple versions - ToolchainNotFound { + PythonNotFound { request, - toolchain_preference: err.toolchain_preference, + python_preference: err.python_preference, environment_preference: err.environment_preference, } }), @@ -962,10 +969,10 @@ fn is_windows_store_shim(_path: &Path) -> bool { false } -impl ToolchainRequest { +impl PythonRequest { /// Create a request from a string. /// - /// This cannot fail, which means weird inputs will be parsed as [`ToolchainRequest::File`] or [`ToolchainRequest::ExecutableName`]. + /// This cannot fail, which means weird inputs will be parsed as [`PythonRequest::File`] or [`PythonRequest::ExecutableName`]. pub fn parse(value: &str) -> Self { // e.g. `3.12.1`, `312`, or `>=3.12` if let Ok(version) = VersionRequest::from_str(value) { @@ -1058,15 +1065,15 @@ impl ToolchainRequest { } match self { - ToolchainRequest::Any => true, - ToolchainRequest::Version(version_request) => { + PythonRequest::Any => true, + PythonRequest::Version(version_request) => { version_request.matches_interpreter(interpreter) } - ToolchainRequest::Directory(directory) => { + PythonRequest::Directory(directory) => { // `sys.prefix` points to the venv root. is_same_executable(directory, interpreter.sys_prefix()) } - ToolchainRequest::File(file) => { + PythonRequest::File(file) => { // The interpreter satisfies the request both if it is the venv... if is_same_executable(interpreter.sys_executable(), file) { return true; @@ -1098,7 +1105,7 @@ impl ToolchainRequest { } false } - ToolchainRequest::ExecutableName(name) => { + PythonRequest::ExecutableName(name) => { // First, see if we have a match in the venv ... if interpreter .sys_executable() @@ -1127,16 +1134,16 @@ impl ToolchainRequest { } false } - ToolchainRequest::Implementation(implementation) => interpreter + PythonRequest::Implementation(implementation) => interpreter .implementation_name() .eq_ignore_ascii_case(implementation.into()), - ToolchainRequest::ImplementationVersion(implementation, version) => { + PythonRequest::ImplementationVersion(implementation, version) => { version.matches_interpreter(interpreter) && interpreter .implementation_name() .eq_ignore_ascii_case(implementation.into()) } - ToolchainRequest::Key(request) => request.satisfied_by_interpreter(interpreter), + PythonRequest::Key(request) => request.satisfied_by_interpreter(interpreter), } } @@ -1145,34 +1152,29 @@ impl ToolchainRequest { } } -impl ToolchainPreference { - fn allows(self, source: ToolchainSource) -> bool { +impl PythonPreference { + fn allows(self, source: PythonSource) -> bool { // If not dealing with a system interpreter source, we don't care about the preference if !matches!( source, - ToolchainSource::Managed | ToolchainSource::SearchPath | ToolchainSource::PyLauncher + PythonSource::Managed | PythonSource::SearchPath | PythonSource::PyLauncher ) { return true; } match self { - ToolchainPreference::OnlyManaged => matches!(source, ToolchainSource::Managed), + PythonPreference::OnlyManaged => matches!(source, PythonSource::Managed), Self::Managed | Self::System | Self::Installed => matches!( source, - ToolchainSource::Managed - | ToolchainSource::SearchPath - | ToolchainSource::PyLauncher + PythonSource::Managed | PythonSource::SearchPath | PythonSource::PyLauncher ), - ToolchainPreference::OnlySystem => { - matches!( - source, - ToolchainSource::SearchPath | ToolchainSource::PyLauncher - ) + PythonPreference::OnlySystem => { + matches!(source, PythonSource::SearchPath | PythonSource::PyLauncher) } } } - /// Return a default [`ToolchainPreference`] based on the environment and preview mode. + /// Return a default [`PythonPreference`] based on the environment and preview mode. pub fn default_from(preview: PreviewMode) -> Self { if env::var_os("UV_TEST_PYTHON_PATH").is_some() { debug!("Only considering system interpreters due to `UV_TEST_PYTHON_PATH`"); @@ -1189,7 +1191,7 @@ impl ToolchainPreference { } } -impl ToolchainFetch { +impl PythonFetch { pub fn is_automatic(self) -> bool { matches!(self, Self::Automatic) } @@ -1454,7 +1456,7 @@ impl fmt::Display for VersionRequest { } } -impl fmt::Display for ToolchainRequest { +impl fmt::Display for PythonRequest { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { Self::Any => write!(f, "any Python"), @@ -1473,7 +1475,7 @@ impl fmt::Display for ToolchainRequest { } } -impl fmt::Display for ToolchainSource { +impl fmt::Display for PythonSource { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { Self::ProvidedPath => f.write_str("provided path"), @@ -1482,21 +1484,21 @@ impl fmt::Display for ToolchainSource { Self::DiscoveredEnvironment => f.write_str("virtual environment"), Self::SearchPath => f.write_str("search path"), Self::PyLauncher => f.write_str("`py` launcher output"), - Self::Managed => f.write_str("managed toolchains"), + Self::Managed => f.write_str("managed installations"), Self::ParentInterpreter => f.write_str("parent interpreter"), } } } -impl fmt::Display for ToolchainPreference { +impl fmt::Display for PythonPreference { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { let s = match self { - Self::OnlyManaged => "managed toolchains", + Self::OnlyManaged => "managed installations", Self::Managed | Self::Installed | Self::System => { if cfg!(windows) { - "managed toolchains, system path, or `py` launcher" + "managed installations, system path, or `py` launcher" } else { - "managed toolchains or system path" + "managed installations or system path" } } Self::OnlySystem => { @@ -1511,11 +1513,11 @@ impl fmt::Display for ToolchainPreference { } } -impl fmt::Display for ToolchainNotFound { +impl fmt::Display for PythonNotFound { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let sources = match self.environment_preference { EnvironmentPreference::Any => { - format!("virtual environments or {}", self.toolchain_preference) + format!("virtual environments or {}", self.python_preference) } EnvironmentPreference::ExplicitSystem => { if self.request.is_explicit_system() { @@ -1524,11 +1526,11 @@ impl fmt::Display for ToolchainNotFound { "virtual environment".to_string() } } - EnvironmentPreference::OnlySystem => self.toolchain_preference.to_string(), + EnvironmentPreference::OnlySystem => self.python_preference.to_string(), EnvironmentPreference::OnlyVirtual => "virtual environments".to_string(), }; match self.request { - ToolchainRequest::Any => { + PythonRequest::Any => { write!(f, "No interpreter found in {sources}") } _ => { @@ -1547,82 +1549,82 @@ mod tests { use super::Error; use crate::{ - discovery::{ToolchainRequest, VersionRequest}, + discovery::{PythonRequest, VersionRequest}, implementation::ImplementationName, }; #[test] fn interpreter_request_from_str() { assert_eq!( - ToolchainRequest::parse("3.12"), - ToolchainRequest::Version(VersionRequest::from_str("3.12").unwrap()) + PythonRequest::parse("3.12"), + PythonRequest::Version(VersionRequest::from_str("3.12").unwrap()) ); assert_eq!( - ToolchainRequest::parse(">=3.12"), - ToolchainRequest::Version(VersionRequest::from_str(">=3.12").unwrap()) + PythonRequest::parse(">=3.12"), + PythonRequest::Version(VersionRequest::from_str(">=3.12").unwrap()) ); assert_eq!( - ToolchainRequest::parse(">=3.12,<3.13"), - ToolchainRequest::Version(VersionRequest::from_str(">=3.12,<3.13").unwrap()) + PythonRequest::parse(">=3.12,<3.13"), + PythonRequest::Version(VersionRequest::from_str(">=3.12,<3.13").unwrap()) ); assert_eq!( - ToolchainRequest::parse("foo"), - ToolchainRequest::ExecutableName("foo".to_string()) + PythonRequest::parse("foo"), + PythonRequest::ExecutableName("foo".to_string()) ); assert_eq!( - ToolchainRequest::parse("cpython"), - ToolchainRequest::Implementation(ImplementationName::CPython) + PythonRequest::parse("cpython"), + PythonRequest::Implementation(ImplementationName::CPython) ); assert_eq!( - ToolchainRequest::parse("cpython3.12.2"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("cpython3.12.2"), + PythonRequest::ImplementationVersion( ImplementationName::CPython, VersionRequest::from_str("3.12.2").unwrap() ) ); assert_eq!( - ToolchainRequest::parse("pypy"), - ToolchainRequest::Implementation(ImplementationName::PyPy) + PythonRequest::parse("pypy"), + PythonRequest::Implementation(ImplementationName::PyPy) ); assert_eq!( - ToolchainRequest::parse("pp"), - ToolchainRequest::Implementation(ImplementationName::PyPy) + PythonRequest::parse("pp"), + PythonRequest::Implementation(ImplementationName::PyPy) ); assert_eq!( - ToolchainRequest::parse("cp"), - ToolchainRequest::Implementation(ImplementationName::CPython) + PythonRequest::parse("cp"), + PythonRequest::Implementation(ImplementationName::CPython) ); assert_eq!( - ToolchainRequest::parse("pypy3.10"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("pypy3.10"), + PythonRequest::ImplementationVersion( ImplementationName::PyPy, VersionRequest::from_str("3.10").unwrap() ) ); assert_eq!( - ToolchainRequest::parse("pp310"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("pp310"), + PythonRequest::ImplementationVersion( ImplementationName::PyPy, VersionRequest::from_str("3.10").unwrap() ) ); assert_eq!( - ToolchainRequest::parse("cp38"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("cp38"), + PythonRequest::ImplementationVersion( ImplementationName::CPython, VersionRequest::from_str("3.8").unwrap() ) ); assert_eq!( - ToolchainRequest::parse("pypy@3.10"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("pypy@3.10"), + PythonRequest::ImplementationVersion( ImplementationName::PyPy, VersionRequest::from_str("3.10").unwrap() ) ); assert_eq!( - ToolchainRequest::parse("pypy310"), - ToolchainRequest::ImplementationVersion( + PythonRequest::parse("pypy310"), + PythonRequest::ImplementationVersion( ImplementationName::PyPy, VersionRequest::from_str("3.10").unwrap() ) @@ -1630,24 +1632,24 @@ mod tests { let tempdir = TempDir::new().unwrap(); assert_eq!( - ToolchainRequest::parse(tempdir.path().to_str().unwrap()), - ToolchainRequest::Directory(tempdir.path().to_path_buf()), + PythonRequest::parse(tempdir.path().to_str().unwrap()), + PythonRequest::Directory(tempdir.path().to_path_buf()), "An existing directory is treated as a directory" ); assert_eq!( - ToolchainRequest::parse(tempdir.child("foo").path().to_str().unwrap()), - ToolchainRequest::File(tempdir.child("foo").path().to_path_buf()), + PythonRequest::parse(tempdir.child("foo").path().to_str().unwrap()), + PythonRequest::File(tempdir.child("foo").path().to_path_buf()), "A path that does not exist is treated as a file" ); tempdir.child("bar").touch().unwrap(); assert_eq!( - ToolchainRequest::parse(tempdir.child("bar").path().to_str().unwrap()), - ToolchainRequest::File(tempdir.child("bar").path().to_path_buf()), + PythonRequest::parse(tempdir.child("bar").path().to_str().unwrap()), + PythonRequest::File(tempdir.child("bar").path().to_path_buf()), "An existing file is treated as a file" ); assert_eq!( - ToolchainRequest::parse("./foo"), - ToolchainRequest::File(PathBuf::from_str("./foo").unwrap()), + PythonRequest::parse("./foo"), + PythonRequest::File(PathBuf::from_str("./foo").unwrap()), "A string with a file system separator is treated as a file" ); } diff --git a/crates/uv-toolchain/src/downloads.inc b/crates/uv-python/src/downloads.inc similarity index 90% rename from crates/uv-toolchain/src/downloads.inc rename to crates/uv-python/src/downloads.inc index b37dd8773..63a20457a 100644 --- a/crates/uv-toolchain/src/downloads.inc +++ b/crates/uv-python/src/downloads.inc @@ -1,11 +1,11 @@ // DO NOT EDIT // -// Generated with `crates/uv-toolchain/template-download-metadata.py` -// From template at `crates/uv-toolchain/src/downloads.inc.mustache` +// Generated with `crates/uv-python/template-download-metadata.py` +// From template at `crates/uv-python/src/downloads.inc.mustache` -pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ - PythonDownload { - key: ToolchainKey { +pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[ + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -17,8 +17,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("fa2b8c377f17dfb097a93c0fba217d93075a7ceba0cc877066e95be969e6b73d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -30,8 +30,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("24daaf20123ac4b2b8657c1ac8227d391d2e5769d81237b68ee674569d307ad0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -43,8 +43,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-armv7-unknown-linux-gnueabi-lto-full.tar.zst", sha256: Some("ab9c7ff6e686b2542470a5ecdb1bbfcb7fada7f8006b9b69a18cbdb52df1d7f4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -56,8 +56,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-armv7-unknown-linux-gnueabihf-lto-full.tar.zst", sha256: Some("a35b08d09a6c1a483f83673c936ed24536a4d2a8930995267425a910d624f860") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -69,8 +69,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("31bb3f579f3dcbbf3bf1dc71a188112e821cdfc77d21c9dbfe82ea78538110e1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -82,8 +82,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("983f056cb8336a54364c2eec3d33808dd74f953f82b720c6a73ad943643b4920") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -95,8 +95,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a009c51b178519e60b6b7848b0ea91f3a92007ca1bdf0a2e8b26b8b7a138cdc0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -108,8 +108,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e49da3f702da08a3e38d01c776cc2356e427217681964ff64a7880507e224a3c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -121,8 +121,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ded92cd034b33df953c490d3343ef187ac065d1fcd78e8cee894be197c5f977e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -134,8 +134,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("bf4ada23b9c52fba6e186b3d3c2ab64990c9e7a701a1f2451c8b61f897c3475b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 3, @@ -147,8 +147,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("776568c92c5f3b47dbf5f17c1c58578f70d75a32654419a158aa8bdc6f95b09a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -160,8 +160,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2afcc8b25c55793f6ceb0bef2e547e101f53c9e25a0fe0332320e5381a1f0fdb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -173,8 +173,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("469a7fd0d0a09936c5db41b5ac83bb29d5bfeb721aa483ac92f3f7ac4d311097") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -186,8 +186,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("ee985ae6a6a98f4d5bd19fd8c59f45235911d19b64e1dbd026261b8103f15db5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -199,8 +199,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("1d70476fb9013cc93e787417680b34629b510e6e2145cf48bb2f0fe887f7a4d8") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -212,8 +212,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f40b88607928b5ee34ff87c1d574c8493a1604d7a40474e1b03731184186f419") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -225,8 +225,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("b4b4d19c36e86803aa0b4410395f5568bef28d82666efba926e44dbe06345a12") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -238,8 +238,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("15b61ed9d33b35ad014a13a68a55d8ea5ba7fb70945644747f4e53c659f2fed6") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -251,8 +251,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("7ec1dc7ad8223ec5839a57d232fd3cf730987f7b0f88b2c4f15ee935bcabbaa9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 2, @@ -264,8 +264,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("a1daf5e8ceb23d34ea29b16b5123b06694810fe7acc5c8384426435c63bf731e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -277,8 +277,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("61e51e3490537b800fcefad718157cf775de41044e95aa538b63ab599f66f3a9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -290,8 +290,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9009da24f436611d0bf086b8ea62aaed1c27104af5b770ddcfc92b60db06da8c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -303,8 +303,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("22866d35fdf58e90e75d6ba9aa78c288b452ea7041fa9bc5549eca9daa431883") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -316,8 +316,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b61686ce05c58c913e4fdb7e7c7105ed36d9bcdcd1a841e7f08b243f40d5cf77") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -329,8 +329,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("505a4fbace661a43b354a059022eb31efb406859a5f7227109ebf0f278f20503") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -342,8 +342,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("bf2b176b0426d7b4d4909c1b19bbb25b4893f9ebdc61e32df144df2b10dcc800") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -355,8 +355,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("89ef67b617b8c9804965509b2d256f53439ceede83b5b64085315f038ad81e60") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -368,8 +368,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("c4b07a02d8f0986b56e010a67132e5eeba1def4991c6c06ed184f831a484a06f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 1, @@ -381,8 +381,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("d9bc1b566250bf51818976bf98bf50e1f4c59b2503b50d29250cac5ab5ef6b38") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -394,8 +394,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("25fc8cd41e975d18d13bcc8f8beffa096ff8a0b86c4a737e1c6617900092c966") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -407,8 +407,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("eb05c976374a9a44596ce340ab35e5461014f30202c3cbe10edcbfbe5ac4a6a1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -420,8 +420,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("465e91b6e6d0d1c40c8a4bce3642c4adcb9b75cf03fbd5fd5a33a36358249289") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -433,8 +433,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("800a89873e30e24bb1b6075f8cd718964537c5ba62bcdbefdcdae4de68ddccc4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -446,8 +446,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("5b1a1effbb43df57ad014fcebf4b20089e504d89613e7b8db22d9ccb9fb00a6c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -459,8 +459,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("3b4781e7fd4efabe574ba0954e54c35c7d5ac4dc5b2990b40796c1c6aec67d79") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -472,8 +472,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a8c38cd2e53136c579632e2938d1b857f22e496c7dba99ad9a7ad6a67b43274a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -485,8 +485,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("91b42595cb4b69ff396e746dc492caf67b952a3ed1a367a4ace1acc965ed9cdb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 12, patch: 0, @@ -498,8 +498,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("5bdff7ed56550d96f9b26a27a8c25f0cc58a03bff19e5f52bba84366183cab8b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -511,8 +511,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("9a59eb9e8e509e742a25cada7b2c1123a56022081d91a8fbe48015cf495b0d0f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -524,8 +524,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("66cb00fa3a0a9bfeff092b8e972d35390c4bc5478a0671e5157ea76a70555d6f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -537,8 +537,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-armv7-unknown-linux-gnueabi-lto-full.tar.zst", sha256: Some("756b3c75e3d76fe70683ec58ef203caa21110e55a2ed6dd22aedb3c645fe67c7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -550,8 +550,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-armv7-unknown-linux-gnueabihf-lto-full.tar.zst", sha256: Some("c86e84722071dc9dba7cc999cc40d4d1667a1e93c7ff2fda64cbdc5b75565c95") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -563,8 +563,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("f0405bb7e19e4dbf7db290c224fc4aa333d3e16e0ed571f0794becac620fa26a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -576,8 +576,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("256b70d6f6abb9c861006f7b9dd1d60ed98e375f729ba00e6cc294c509801a4e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -589,8 +589,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a1dc330f45d1c3dc0eb71d9c8d7db163769806bef81f975ff88e5c936cd8c8bd") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -602,8 +602,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("b1b156ceed6bc53c3c8816b3b5c3983d2c7070a8a42558b9c6dd730faec164e2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -615,8 +615,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("fe24023c24cfd0105b038c271578637654a0e4f4f19c6a8aa3a47afc958cea9d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -628,8 +628,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("1be233f7a60358681e84a62883485ac0672d55e0fb9191dd2d638a24d47be604") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 9, @@ -641,8 +641,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("25344b08303f72ba2a37c33aa240fbd2c8d5a41bcce79cff63923b3d778c645c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -654,8 +654,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("c0650884b929253b8688797d1955850f6e339bf0428b3d935f62ab3159f66362") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -667,8 +667,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("45bf082aca6b7d5e7261852720a72b92f5305e9fdb07b10f6588cb51d8f83ff2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -680,8 +680,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c3e90962996177a027bd73dd9fd8c42a2d6ef832cda26db4ab4efc6105160537") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -693,8 +693,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a9716f2eebebe03de47d6d5d603d6ff78abf5eb38f88bf7607b17fd85e74ff16") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -706,8 +706,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d495830b5980ed689bd7588aa556bac9c43ff766d8a8b32e7791b8ed664b04f3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -719,8 +719,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("54f8c8ad7313b3505e495bb093825d85eab244306ca4278836a2c7b5b74fb053") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -732,8 +732,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d959c43184878d564b5368ce4d753cf059600aafdf3e50280e850f94b5a4ba61") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -745,8 +745,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("a03a9d8c1f770ce418716a2e8185df7b3a9e0012cdc220f9f2d24480a432650b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 8, @@ -758,8 +758,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6da82390f7ac49f6c4b19a5b8019c4ddc1eef2c5ad6a2f2d32773a27663a4e14") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -771,8 +771,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("c1f3dd13825906a5eae23ed8de9b653edb620568b2e0226eef3784eb1cce7eed") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -784,8 +784,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e3a375f8f16198ccf8dbede231536544265e5b4b6b0f0df97c5b29503c5864e2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -797,8 +797,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6613f1f9238d19969d8a2827deec84611cb772503207056cc9f0deb89bea48cd") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -810,8 +810,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("016ed6470c599ea5cc4dbb9c3f3fe86be059ad4e1b6cd2df10e40b7ec6970f16") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -823,8 +823,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("91b33369025b7e0079f603cd2a99f9a5932daa8ded113d5090f29c075c993df7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -836,8 +836,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("3f8caf73f2bfe22efa9666974c119727e163716e88af8ed3caa1e0ae5493de61") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -849,8 +849,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("01bca7a2f457d4bd2b367640d9337d12b31db73d670a16500b7a751194942103") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -862,8 +862,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("f387d373d64447bbba8a5657712f93b1dbdfd7246cdfe5a0493f39b83d46ec7c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 7, @@ -875,8 +875,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("89d1d8f080e5494ea57918fc5ecf3d483ffef943cd5a336e64da150cd44b4aa0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -888,8 +888,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("6e9007bcbbf51203e89c34a87ed42561630a35bc4eb04a565c92ba7159fe5826") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -901,8 +901,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d63d6eb065e60899b25853fe6bbd9f60ea6c3b12f4854adc75cb818bad55f4e9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -914,8 +914,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("2670731428191d4476bf260c8144ccf06f9e5f8ac6f2de1dc444ca96ab627082") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -927,8 +927,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("71c34db1165860a6bf458d817aef00dea96146130bf5f8bd7ee39b12892ef463") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -940,8 +940,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("78252aa883fed18de7bb9b146450e42dd75d78c345f56c1301bb042317a1d4f7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -953,8 +953,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("3685156e4139e89484c071ba1a1b85be0b4e302a786de5a170d3b0713863c2e8") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -966,8 +966,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("6e7889a15d861f1860ed84f3f5ea4586d198aa003b22556d91e180a44184dcd7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -979,8 +979,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("1b6e32ec93c5a18a03a9da9e2a3a3738d67b733df0795edcff9fd749c33ab931") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 6, @@ -992,8 +992,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6%2B20231002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("38d2c2fa2f9effbf486207bef7141d1b5c385ad30729ab0c976e6a852a2a9401") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1005,8 +1005,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("7bee180b764722a73c2599fbe2c3a6121cf6bbcb08cb3082851e93c43fe130e7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1018,8 +1018,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ac4b1e91d1cb7027595bfa4667090406331b291b2e346fb74e42b7031b216787") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1031,8 +1031,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("75d27b399b323c25d8250fda9857e388bf1b03ba1eb7925ec23cf12042a63a88") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1044,8 +1044,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c9ffe9c2c88685ce3064f734cbdfede0a07de7d826fada58f8045f3bd8f81a9d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1057,8 +1057,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("1aee6a613385a6355bed61a9b12259a5ed16e871b5bdfe5c9fe98b46ee2bb05e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1070,8 +1070,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b0819032ec336d6e1d9e9bfdba546bf854a7b7248f8720a6d07da72c4ac927e5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1083,8 +1083,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e43d70a49919641ca2939a5a9107b13d5fef8c13af0f511a33a94bb6af2044f0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1096,8 +1096,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("93ee095b53de5a74af18e612f55095fcf3118c3c0a87eb6344d8eaca396bfb2d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1109,8 +1109,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("9dcf19ee54fb936cb9fd0f02fd655e790663534bc12e142e460c1b30a0b54dbd") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 5, @@ -1122,8 +1122,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.11.5%2B20230826-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6e4d20e6d498f9edeb3c28cb9541ad20f675f16da350b078e40a9dcfd93cdc3d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1135,8 +1135,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("988d476c806f71a3233ff4266eda166a5d28cf83ba306ac88b4220554fc83e8c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1148,8 +1148,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("37cf00439b57adf7ffef4a349d62dcf09739ba67b670e903b00b25f81fbb8a68") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1161,8 +1161,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a9051364b5c2e28205f8484cae03d16c86b45df5d117324e846d0f5e870fe9fb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1174,8 +1174,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("0d22f43c5bb3f27ff2f9e8c60b0d7abd391bb2cac1790b0960970ff5580f6e9a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1187,8 +1187,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b9f76fd226bfcbc6a8769934b17323ca3b563f1c24660582fcccfa6d0c7146af") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1200,8 +1200,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("8ef6b5fa86b4abf51865b346b7cf8df36e474ed308869fc0ac3fe82de39194a4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1213,8 +1213,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("6d9765785316c7f1c07def71b413c92c84302f798b30ee09e2e0b5da28353a51") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1226,8 +1226,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("1b5fdeb2dc56c30843e7350f1684178755fae91666a0a987e5eb39074c42a052") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1239,8 +1239,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("fc2ea02ced875c90b8d025b409d58c4f045df8ba951bfa2b8b0a3cfe11c3b41c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 4, @@ -1252,8 +1252,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.11.4%2B20230726-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("1692d795d6199b2261161ae54250009ffad0317929302903f6f2c773befd4d76") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1265,8 +1265,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("cd296d628ceebf55a78c7f6a7aed379eba9dbd72045d002e1c2c85af0d6f5049") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1278,8 +1278,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("991521082b0347878ba855c4986d77cc805c22ef75159bc95dd24bfd80275e27") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1291,8 +1291,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7bd694eb848328e96f524ded0f9b9eca6230d71fce3cd49b335a5c33450f3e04") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1304,8 +1304,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("877c90ef778a526aa25ab417034f5e70728ac14e5eb1fa5cfd741f531203a3fc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1317,8 +1317,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("241d583be3ecc34d76fafa0d186cb504ce5625eb2c0e895dc4f4073a649e5c73") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1330,8 +1330,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2fbb31a8bc6663e2d31d3054319b51a29b1915c03222a94b9d563233e11d1bef") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1343,8 +1343,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("4f1192179e1f62e69b8b45f7f699e6f0100fb0b8a39aad7a48472794d0c24bd4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1356,8 +1356,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("8c5adef5bc627f39e93b920af86ef740e917aa698530ff727978d446a07bbd8b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 3, @@ -1369,8 +1369,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("9d27e607fb1cb2d766e17f27853013d8c0f0b09ac53127aaff03ec89ab13370d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1382,8 +1382,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("da187194cc351d827232b1d2d85b2855d7e25a4ada3e47bc34b4f87b1d989be5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1395,8 +1395,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("8fe27d850c02aa7bb34088fad5b48df90b4b841f40e1472243b8ab9da8776e40") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1408,8 +1408,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7986ebe82c07ecd2eb94fd1b3c9ebbb2366db2360e38f29ae0543e857551d0bf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1421,8 +1421,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("b062ac2c72a85510fb9300675bd5c716baede21e9482ef6335247b4aa006584c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1434,8 +1434,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("0eb61be53ee13cf75a30b8a164ef513a2c7995b25b118a3a503245d46231b13a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1447,8 +1447,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b5bf700afc77588d853832d10b74ba793811cbec41b02ebc2c39a8b9987aacdd") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1460,8 +1460,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("ec5da5b428f6d91d96cde2621c0380f67bb96e4257d2628bc70b50e75ec5f629") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 11, patch: 1, @@ -1473,8 +1473,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("f5c46fffda7d7894b975af728f739b02d1cec50fd4a3ea49f69de9ceaae74b17") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1486,8 +1486,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("fa95c3a18e29234cf10c0befa2f08246307cab7f473ccc1804845be3caab076d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1499,8 +1499,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("de404d6693cd550626b07312fe9919e0bc702bfdd096c66bd43c607e6a4e6959") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1512,8 +1512,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-armv7-unknown-linux-gnueabi-lto-full.tar.zst", sha256: Some("7dbd45c6b132907d5c04e3067e03e67da4a8876b2eaf4c3e10fbf214b3b4a7ca") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1525,8 +1525,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-armv7-unknown-linux-gnueabihf-lto-full.tar.zst", sha256: Some("0d08574d76a30c9ad730fc0cf3c625cd2a8cfa8d5fdfb821231c0e68ef05d713") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1538,8 +1538,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("4fafd723944ae98611005caf0ad7dbb262e02c61ddfa7c45f0d097f0965839a8") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1551,8 +1551,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("413da7a9417eb63db96c2625e50b484de0c5ea02210a2d85a9b2162c19d31111") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1564,8 +1564,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a0d0c72e74176c1375d79a73f738c76c243392b45cf681109406cddaceb9e1b3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1577,8 +1577,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("cc3fa88159a50d639dff84af9ffe2a50d6eda41b51037c755b5a13b88ce50153") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1590,8 +1590,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e327322f9cc4a793118f492012426f11a61459ce83a8ebde0ca7c4bf3d1710a6") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1603,8 +1603,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("614d4e192276e3e3f030bd8eb8155e05e291bb5a8154af8a862e9f56afa74628") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 14, @@ -1616,8 +1616,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("abc3041f0de7e700229c0628dfcba7ba1d15c8b2924621add7baf1554a088768") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1629,8 +1629,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("57b83a4aa32bdbe7611f1290313ef24f2574dff5fa59181c0ccb26c14c688b73") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1642,8 +1642,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("06a53040504e1e2fdcb32dc0d61b123bea76725b5c14031c8f64e28f52ae5a5f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1655,8 +1655,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.10.13%2B20230826-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("08a3a1ff61b7ed2c87db7a9f88630781d98fabc2efb499f38ae0ead05973eb56") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1668,8 +1668,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c8b99dcf267c574fdfbdf4e9d63ec7a4aa4608565fee3fba0b2f73843b9713b2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1681,8 +1681,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("cab4c8756445d1d1987c7c94d3bcf323684e44fb9070329d8287d4c38e155711") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1694,8 +1694,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("fe46914541126297c7a8636845c2e7188868eaa617bb6e293871fca4a5cb63f7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1707,8 +1707,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("a41c1e28e2a646bac69e023873d40a43c5958d251c6adfa83d5811a7cb034c7a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1720,8 +1720,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("41b20e9d87f57d27f608685b714a57eea81c9e079aa647d59837ec6659536626") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1733,8 +1733,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("fd18e6039be25bf23d13caf5140569df71d61312b823b715b3c788747fec48e9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 13, @@ -1746,8 +1746,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6a2c8f37509556e5d463b1f437cdf7772ebd84cdf183c258d783e64bb3109505") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1759,8 +1759,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("a7d0cadbe867cc53dd47d7327244154157a7cca02edb88cf3bb760a4f91d4e44") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1772,8 +1772,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e30f2b4fd9bd79b9122e2975f3c17c9ddd727f8326b2e246378e81f7ecc7d74f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1785,8 +1785,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("89c83fcdfd41c67e2dd2a037982556c657dc55fc1938c6f6cdcd5ffa614c1fb3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1798,8 +1798,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("0743b9976f20b06d9cf12de9d1b2dfe06b13f76978275e9dac73a275624bde2c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1811,8 +1811,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("c318050fa91d84d447f5c8a5887a44f1cc8dd34d4c1d357cd755407d46ed1b21") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1824,8 +1824,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("756579b52acb9b13b162ac901e56ff311def443e69d7f7259a91198b76a30ecb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1837,8 +1837,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("f1fa448384dd48033825e56ee6b5afc76c5dd67dcf2b73b61d2b252ae2e87bca") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1850,8 +1850,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("fb7354fcee7b17dd0793ebd3f6f1fc8b7b205332afcf8d700cc1119f2dc33ff7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1863,8 +1863,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("b343cbe7c41b7698b568ea5252328cdccb213100efa71da8d3db6e21afd9f6cf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 12, @@ -1876,8 +1876,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("cb6e7c84d9e369a0ee76c9ea73d415a113ba9982db58f44e6bab5414838d35f3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1889,8 +1889,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("da9c8a3cd04485fd397387ea2fa56f3cac71827aafb51d8438b2868f86eb345b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1902,8 +1902,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a5271cc014f2ce2ab54a0789556c15b84668e2afcc530512818c4b87c6a94483") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1915,8 +1915,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9304d6eeef48bd246a2959ebc76b20dbb2c6a81aa1d214f4471cb273c11717f2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1928,8 +1928,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("60e76e136ab23b891ed1212e58bd11a73a19cd9fd884ec1c5653ca1c159d674e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1941,8 +1941,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ac32e3788109ff0cc536a6108072d9203217df744cf56d3a4ab0b19857d8e244") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1954,8 +1954,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e84c12aa0285235eed365971ceedf040f4d8014f5342d371e138a4da9e4e9b7c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1967,8 +1967,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("544e5020f71ad1525dbc92b08e429cc1e1e11866c48c07d91e99f531b9ba68b0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1980,8 +1980,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("7918188e01a266915dd0945711e274d45c8d7fb540d48240e13c4fd96f43afbb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 11, @@ -1993,8 +1993,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("9b4dc4a335b6122ce783bc80f5015b683e3ab1a56054751c5df494db0521da67") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2006,8 +2006,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2508b8d4b725bb45c3e03d2ddd2b8441f1a74677cb6bd6076e692c0923135ded") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2019,8 +2019,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("2c0996dd1fe35314e06e042081b24fb53f3b7b361c3e1b94a6ed659c275ca069") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2032,8 +2032,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f8c3a63620f412c4a9ccfb6e2435a96a55775550c81a452d164caa6d03a6a1da") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2045,8 +2045,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("3d79cfd229ec12b678bbfd79c30fb4cbad9950d6bfb29741d2315b11839998b4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2058,8 +2058,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("1153b4d3b03cf1e1d8ec93c098160586f665fcc2d162c0812140a716a688df58") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2071,8 +2071,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a90a45ba7afcbd1df9aef96a614acbb210607299ac74dadbb6bd66af22be34db") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2084,8 +2084,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("1310f187a73b00164ec4ca34e643841c5c34cbb93fe0b3a3f9504e5ea5001ec7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 9, @@ -2097,8 +2097,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.10.9%2B20230116-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("4cfa6299a78a3959102c461d126e4869616f0a49c60b44220c000fc9aecddd78") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2110,8 +2110,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("f8ba5f87153a17717e900ff7bba20e2eefe8a53a5bd3c78f9f6922d6d910912d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2123,8 +2123,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("879e76260be226512693e37a28cc3a6670b5ee270a4440e4b04a7b415dba451c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2136,8 +2136,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ab434eccffeec4f6f51af017e4eed69d4f1ea55f48c5b89b8a8779df3fa799df") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2149,8 +2149,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("7547ea172f7fa3d7619855f28780da9feb615b6cb52c5c64d34f65b542799fee") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2162,8 +2162,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("a18f81ecc7da0779be960ad35c561a834866c0e6d1310a4f742fddfd6163753f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2175,8 +2175,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("c86182951a82e761588476a0155afe99ae4ae1030e4a8e1e8bcb8e1d42f6327c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2188,8 +2188,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("bb87e933afcfd2e8de045e5a691feff1fb8fb06a09315b37d187762fddfc4546") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 8, @@ -2201,8 +2201,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.10.8%2B20221106-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("ab40f9584be896c697c5fca351ab82d7b55f01b8eb0494f0a15a67562e49161a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2214,8 +2214,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("9f44cf63441a90f4ec99a032a2bda43971ae7964822daa0ee730a9cba15d50da") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2227,8 +2227,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9f346729b523e860194635eb67c9f6bc8f12728ba7ddfe4fd80f2e6d685781e3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2240,8 +2240,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a79816c50abeb2752530f68b4d7d95b6f48392f44a9a7f135b91807d76872972") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2253,8 +2253,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("323532701cb468199d6f14031b991f945d4bbf986ca818185e17e132d3763bdf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2266,8 +2266,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e03e28dc9fe55ea5ca06fece8f2f2a16646b217d28c0cd09ebcd512f444fdc90") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2279,8 +2279,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ce3fe27e6ca3a0e75a7f4f3b6568cd1bf967230a67e73393e94a23380dddaf10") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2292,8 +2292,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("7f2c933d23c0f38cf145c2d6c65b5cf53bb589690d394fd4c01b2230c23c2bff") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 7, @@ -2305,8 +2305,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.10.7%2B20221002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("5363974e6ee6c91dbd6bc3533e38b02a26abc2ff1c9a095912f237b916be22d3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2318,8 +2318,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("159230851a69cf5cab80318bce48674244d7c6304de81f44c22ff0abdf895cfa") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2331,8 +2331,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("edc1c9742b824caebbc5cb224c8990aa8658b81593fd9219accf3efa3e849501") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2344,8 +2344,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("07fa4f5499b8885d1eea49caf5476d76305ab73494b7398dfd22c14093859e4f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2357,8 +2357,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("8d9a259e15d5a1be48ef13cd5627d7f6c15eadf41a3539e99ed1deee668c075e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2370,8 +2370,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("9405499573a7aa8b67d070d096ded4f3e571f18c2b34762606ecc8025290b122") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2383,8 +2383,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("407e5951e39f5652b32b72b715c4aa772dd8c2da1065161c58c30a1f976dd1b2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2396,8 +2396,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("f859a72da0bb2f1261f8cebdac931b05b59474c7cb65cee8e85c34fc014dd452") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 6, @@ -2409,8 +2409,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.10.6%2B20220802-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("01dc349721594b1bb5b582651f81479a24352f718fdf6279101caa0f377b160a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2422,8 +2422,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("f68d25dbe9daa96187fa9e05dd8969f46685547fecf1861a99af898f96a5379e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2435,8 +2435,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9fa6970a3d0a5dc26c4ed272bb1836d1f1f7a8f4b9d67f634d0262ff8c1fed0b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2448,8 +2448,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("63fcfc425adabc034c851dadfb499de3083fd7758582191c12162ad2471256b0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2461,8 +2461,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("e201192f0aa73904bc5a5f43d1ce4c9fb243dfe02138e690676713fe02c7d662") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2474,8 +2474,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("5e372e6738a733532aa985730d9a47ee4c77b7c706e91ef61d37aacbb2e54845") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2487,8 +2487,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f8dfb83885d1cbc82febfa613258c1f6954ea88ef43ed7dc710d6df20efecdab") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2500,8 +2500,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("3682e0add14a3bac654afe467a84981628b0c7ebdccd4ebf26dfaa916238e2fe") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 5, @@ -2513,8 +2513,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220630/cpython-3.10.5%2B20220630-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("cff35feefe423d4282e9a3e1bb756d0acbb2f776b1ada82c44c71ac3e1491448") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2526,8 +2526,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("c404f226195d79933b1e0a3ec88f0b79d35c873de592e223e11008f3a37f83d6") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2539,8 +2539,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("092369e9d170c4c1074e1b305accb74f9486e6185d2e3f3f971869ff89538d3e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2552,8 +2552,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ba940a74a7434fe78d81aed9fb1e5ccdc3d97191a2db35716fc94e3b6604ace0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2565,8 +2565,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c37a47e46de93473916f700a790cb43515f00745fba6790004e2731ec934f4d3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2578,8 +2578,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e447f00fe53168d18cbfe110645dbf33982a17580b9e4424a411f9245d99cd21") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2591,8 +2591,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7699f76ef89b436b452eacdbab508da3cd94146ba29b099f5cb6e250afba3210") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2604,8 +2604,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("8b8b97f7746a3deca91ada408025457ced34f582dad2114b33ce6fec9cf35b28") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 4, @@ -2617,8 +2617,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220528/cpython-3.10.4%2B20220528-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("d636dc1bcca74dd9c6e3b26f7c081b3e229336e8378fe554bf8ba65fe780a2ac") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2630,8 +2630,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("b1abefd0fc66922cf9749e4d5ceb97df4d3cfad0cd9cdc4bd04262a68d565698") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2643,8 +2643,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("101284d27578438da200be1f6b9a1ba621432c5549fa5517797ec320bf75e3d5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2656,8 +2656,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("43c1cd6e203bfba1a2eeb96cd2a15ce0ebde0e72ecc9555934116459347a9c28") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2669,8 +2669,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("fbc0924a138937fe435fcdb20b0c6241290558e07f158e5578bd91cc8acef469") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2682,8 +2682,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("bc5d6f284b506104ff6b4e36cec84cbdb4602dfed4c6fe19971a808eb8c439ec") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2695,8 +2695,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("04760d869234ee8f801feb08edc042a6965320f6c0a7aedf92ec35501fef3b21") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2708,8 +2708,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("7c034d8a5787744939335ce43d64f2ddcc830a74e63773408d0c8f3c3a4e7916") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 3, @@ -2721,8 +2721,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.10.3%2B20220318-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("72b91d26f54321ba90a86a3bbc711fa1ac31e0704fec352b36e70b0251ffb13c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2734,8 +2734,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("1ef939fd471a9d346a7bc43d2c16fb483ddc4f98af6dad7f08a009e299977a1a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2747,8 +2747,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9936f1549f950311229465de509b35c062aa474e504c20a1d6f0f632da57e002") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2760,8 +2760,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9be2a667f29ed048165cfb3f5dbe61703fd3e5956f8f517ae098740ac8411c0b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2773,8 +2773,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("698b09b1b8321a4dc43d62f6230b62adcd0df018b2bcf5f1b4a7ce53dcf23bcc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2786,8 +2786,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("bacf720c13ab67685a384f1417e9c2420972d88f29c8b7c26e72874177f2d120") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2799,8 +2799,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d22d85f60b2ef982b747adda2d1bde4a32c23c3d8f652c00ce44526750859e4e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2812,8 +2812,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("df246cf27db346081935d33ce0344a185d1f08b04a4500eb1e21d4d922ee7eb4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 2, @@ -2825,8 +2825,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.10.2%2B20220227-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("7397e78a4fbe429144adc1f33af942bdd5175184e082ac88f3023b3a740dd1a0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2838,8 +2838,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-aarch64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2851,8 +2851,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-aarch64-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2864,8 +2864,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-i686-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2877,8 +2877,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-i686-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2890,8 +2890,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2903,8 +2903,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2916,8 +2916,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-unknown-linux-musl-lto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 10, patch: 0, @@ -2929,8 +2929,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -2942,8 +2942,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("04fd532cfba9b3184a94feaf689bd6147759f1d34ddd674e8b2c146b37a994b1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -2955,8 +2955,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("ac0612c7cbc01abc39865c7a1dfca04fb684c6c3f3a687154f5401b61bcb4041") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -2968,8 +2968,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-armv7-unknown-linux-gnueabi-lto-full.tar.zst", sha256: Some("9102cce19d31f58c205c834e070a61fc1c80f03e87241c1daca7829d2a9c1f3d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -2981,8 +2981,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-armv7-unknown-linux-gnueabihf-lto-full.tar.zst", sha256: Some("148e939ceeb5d5755570cb5db5e51b0c3b6d2c86dba818a50439766ba6f98655") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -2994,8 +2994,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("7e6edb16a3973fbb894f3cf4f60a34e22645e84621ec61c622cf4c5a2f4bf2a2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3007,8 +3007,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f16518d2ac9f34798bbc04adcf2227c924cef8b25be2d20e418d75bea9c12f7e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3020,8 +3020,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b28e9b78e0086145bb10778db1ae48e6309b5730b5ec355384089183c8a0e109") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3033,8 +3033,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2bb4ed2fc03bb05ac6680b8c11d3c64f7a7dd24b80089c5ad85a91ea4a1795aa") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3046,8 +3046,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d946c9e2ad7c22dbea22aa6509d8017bb24e2735c1f9f06349e9beccd21f5e29") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3059,8 +3059,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("6b8d9f5e0c292cc564edcf12368be114a68bf941269df2473754d1cfb59e48fc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 19, @@ -3072,8 +3072,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("e3611b5699c97bf5ac289e3636e8f932fb177997ee69a81b0c2b15c766ca6f13") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3085,8 +3085,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("579f9b68bbb3a915cbab9682e4d3c253bc96b0556b8a860982c49c25c61f974a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3098,8 +3098,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d27efd4609a3e15ff901040529d5689be99f2ebfe5132ab980d066d775068265") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3111,8 +3111,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.9.18%2B20230826-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7faf8fdfbad04e0356a9d52c9b8be4d40ffef85c9ab3e312c45bd64997ef8aa9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3124,8 +3124,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("212d413ab6f854f588cf368fdd2aa140bb7c7ee930e3f7ac1002cba1e50e9685") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3137,8 +3137,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("c138eef19229351226a11e752230b8aa9d499ba9720f9f0574fa3260ccacb99b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3150,8 +3150,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("dd05eff699ce5a7eee545bc05e4869c4e64ee02bf0c70691bcee215604c6b393") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3163,8 +3163,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("146537b9b4a1baa672eed94373e149ca1ee339c4df121e8916d8436265e5245e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3176,8 +3176,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e1fa92798fab6f3b44a48f24b8e284660c34738d560681b206f0deb0616465f9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3189,8 +3189,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("8bf88ae2100e609902d98ec775468e3a41a834f6528e632d6d971f5f75340336") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 18, @@ -3202,8 +3202,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("924ed4f375ef73c73a725ef18ec6a72726456673d5a116f132f60860a25dd674") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3215,8 +3215,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2902e2a0add6d584999fa27896b721a359f7308404e936e80b01b07aa06e8f5e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3228,8 +3228,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("1f6c43d92ba9f4e15149cf5db6ecde11e05eee92c070a085e44f46c559520257") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3241,8 +3241,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("1a9b7edc16683410c27bc5b4b1761143bef7831a1ad172e7e3581c152c6837a2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3254,8 +3254,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("ffac27bfb8bdf615d0fc6cbbe0becaa65b6ae73feec417919601497fce2be0ab") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3267,8 +3267,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("bcb0ec31342df52b4555be309080a9c3224e7ff60a6291e34337ddfddef111cf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3280,8 +3280,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-s390x-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("bf8c846c1a4e52355d4ae294f4e1da9587d5415467eb6890bdf0f5a4c8cda396") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3293,8 +3293,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("ba04f9813b78b61d60a27857949403a1b1dd8ac053e1f1aff72fe2689c238d3c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3306,8 +3306,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("649fff6048f4cb9e64a85eaf8e720eb4c3257e27e7c4ee46f75bfa48c18c6826") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3319,8 +3319,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("8496473a97e1dd43bf96fc1cf19f02f305608ef6a783e0112274e0ae01df4f2a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 17, @@ -3332,8 +3332,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("209983b8227e4755197dfed4f6887e45b6a133f61e7eb913c0a934b0d0c3e00f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3345,8 +3345,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("c86ed2bf3ff290af10f96183c53e2b29e954abb520806fbe01d3ef2f9d809a75") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3358,8 +3358,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("57ac7ce9d3dd32c1277ee7295daf5ad7b5ecc929e65b31f11b1e7b94cd355ed1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3371,8 +3371,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e2a0226165550492e895369ee1b69a515f82e12cb969656012ee8e1543409661") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3384,8 +3384,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("d7994b5febb375bb131d028f98f4902ba308913c77095457ccd159b521e20c52") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3397,8 +3397,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-ppc64le-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("8b2e7ddc6feb116dfa6829cfc478be90a374dc5ce123a98bc77e86d0e93e917d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3410,8 +3410,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("5809626ca7907c8ea397341f3d5eafb280ed5b19cc5622e57b14d9b4362eba50") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3423,8 +3423,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("cdc1290b9bdb2f74a6c48ab24531919551128e39773365c6f3e17668216275a0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3436,8 +3436,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("c397f292021b33531248ad8fede24ef6249cc6172347b2017f92b4a71845b8ed") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 16, @@ -3449,8 +3449,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("199c821505e287c004c3796ba9ac4bd129d7793e1d833e9a7672ed03bdb397d4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3462,8 +3462,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("1799b97619572ad595cd6d309bbcc57606138a57f4e90af04e04ee31d187e22f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3475,8 +3475,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("0da1f081313b088c1381206e698e70fffdffc01e1b2ce284145c24ee5f5b4cbb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3488,8 +3488,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("cbc6a14835022d89f4ca6042a06c4959d74d4bbb58e70bdbe0fe8d2928934922") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3501,8 +3501,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("a5ad2a6ace97d458ad7b2857fba519c5c332362442d88e2b23ed818f243b8a78") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3514,8 +3514,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("50fd795eac55c4485e2fefbb8e7b365461817733c45becb50a7480a243e6000e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3527,8 +3527,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("6a08761bb725b8d3a92144f81628febeab8b12326ca264ffe28255fa67c7bf17") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3540,8 +3540,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("4597f0009cfb52e748a57badab28edf84a263390b777c182b18c36d666a01440") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 15, @@ -3553,8 +3553,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.9.15%2B20221106-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("d0f3ce1748a51779eedf155aea617c39426e3f7bfd93b4876cb172576b6e8bda") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3566,8 +3566,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("6b9d2ff724aff88a4d0790c86f2e5d17037736f35a796e71732624191ddd6e38") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3579,8 +3579,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("3020c743e4742d6e0e5d27fcb166c694bf1d9565369b2eaee9d68434304aebd2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3592,8 +3592,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("83a11c4f3d1c0ec39119bd0513a8684b59b68c3989cf1e5042d7417d4770c904") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3605,8 +3605,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("fae990eb312314102408cb0c0453dae670f0eb468f4cbf3e72327ceaa1276b46") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3618,8 +3618,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("186155e19b63da3248347415f888fbcf982c7587f6f927922ca243ae3f23ed2f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3631,8 +3631,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("54529c0a8ffe621f5c9c6bdd22968cac9d3207cbd5dcd9c07bbe61140c49937e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3644,8 +3644,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("5638c12d47eb81adf96615cea8a5a61e8414c3ac03a8b570d30ae9998cb6d030") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 14, @@ -3657,8 +3657,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14%2B20221002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("49f27a3a18b4c2d765b0656c6529378a20b3e37fdb0aca9490576ff7a67243a9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3670,8 +3670,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("8612e9328663c0747d1eae36b218d11c2fbc53c39ec7512c7ad6b1b57374a5dc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3683,8 +3683,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("8c706ebb2c8970da4fbec95b0520b4632309bc6a3e115cf309e38f181b553d14") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3696,8 +3696,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7d33637b48c45acf8805d5460895dca29bf2740fd2cf502fde6c6a00637db6b5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3709,8 +3709,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("3860abee418825c6a33f76fe88773fb05eb4bc724d246f1af063106d9ea3f999") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3722,8 +3722,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("16d21a6e62c19c574a4a225961e80966449095a8eb2c4150905e30d4e807cf86") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3735,8 +3735,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("352d00a4630d0665387bcb158aec3f6c7fc5a4d14d65ac26e1b826e20611222f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3748,8 +3748,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("c7e48545a8291fe1be909c4454b5c48df0ee4e69e2b5e13b6144b4199c31f895") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 13, @@ -3761,8 +3761,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.9.13%2B20220802-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6ef2b164cae483c61da30fb6d245762b8d6d91346d66cb421989d6d1462e5a48") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3774,8 +3774,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("b3d09b3c12295e893ee8f2cb60e8af94d8a21fc5c65016282925220f5270b85b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3787,8 +3787,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("202ef64e43570f0843ff5895fd9c1a2c36a96b48d52842fa95842d7d11025b20") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3800,8 +3800,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e52fdbe61dea847323cd6e81142d16a571dca9c0bcde3bfe5ae75a8d3d1a3bf4") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3813,8 +3813,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("361b8fa66d6b5d5623fd5e64af29cf220a693ba86d031bf7ce2b61e1ea50f568") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3826,8 +3826,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("825970ae30ae7a30a5b039aa25f1b965e2d1fe046e196e61fa2a3af8fef8c5d9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3839,8 +3839,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7290ac14e43749afdb37d3c9690f300f5f0786f19982e8960566ecdc3e42c3eb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3852,8 +3852,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("eb122ab2bf0b2d71926984bc7cf5fef65b415abfe01a0974ed6c1a2502fac764") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 12, @@ -3865,8 +3865,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220502/cpython-3.9.12%2B20220502-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c49f8b07e9c4dcfd7a5b55c131e882a4ebdf9f37fef1c7820c3ce9eb23bab8ab") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3878,8 +3878,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("6d9f20607a20e2cc5ad1428f7366832dc68403fc15f2e4f195817187e7b6dbbf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3891,8 +3891,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("e1f3ae07a28a687f8602fb4d29a1b72cc5e113c61dc6769d0d85081ab3e09c71") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3904,8 +3904,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("0be0a5f524c68d521be2417565ca43f3125b1845f996d6d62266aa431e673f93") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3917,8 +3917,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("f06338422e7e3ad25d0cd61864bdb36d565d46440dd363cbb98821d388ed377a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3930,8 +3930,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("35e649618e7e602778e72b91c9c50c97d01a0c3509d16225a1f41dd0fd6575f0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3943,8 +3943,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("020bcbfff16dc5ce35a898763be3d847c97df2e14dabf483a8ec88b0455ff971") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3956,8 +3956,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("d83eb5c897120e32287cb6fe5c24dd2dcae00878b3f9d7002590d468bd5de0f1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 11, @@ -3969,8 +3969,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220318/cpython-3.9.11%2B20220318-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("1fe3c519d43737dc7743aec43f72735e1429c79e06e3901b21bad67b642f1a10") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -3982,8 +3982,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("ba1b63600ed8d9f3b8d739657bd8e7f5ca167de29a1a58d04b2cd9940b289464") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -3995,8 +3995,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("8bf7ac2cd5825b8fde0a6e535266a57c97e82fd5a97877940920b403ca5e53d7") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4008,8 +4008,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("3e3bf4d3e71a2131e6c064d1e5019f58cb9c58fdceae4b76b26ac978a6d49aad") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4021,8 +4021,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("7f3ca15f89775f76a32e6ea9b2c9778ebf0cde753c5973d4493959e75dd92488") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4034,8 +4034,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("ef2f090ff920708b4b9aa5d6adf0dc930c09a4bf638d71e6883091f9e629193d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4047,8 +4047,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("d453abf741c3196ffc8470f3ea6404a3e2b55b2674a501bb79162f06122423e5") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4060,8 +4060,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("2744b817f249c0563b844cddd5aba4cc2fd449489b8bd59980d7a31de3a4ece1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 10, @@ -4073,8 +4073,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.9.10%2B20220227-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("56b2738599131d03b39b914ea0597862fd9096e5e64816bf19466bf026e74f0c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4086,8 +4086,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-aarch64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4099,8 +4099,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-aarch64-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4112,8 +4112,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-i686-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4125,8 +4125,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-i686-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4138,8 +4138,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-x86_64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4151,8 +4151,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-x86_64-unknown-linux-gnu-debug-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4164,8 +4164,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-x86_64-unknown-linux-musl-lto-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 7, @@ -4177,8 +4177,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.9.7-x86_64-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4190,8 +4190,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-aarch64-apple-darwin-pgo%2Blto-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4203,8 +4203,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-aarch64-unknown-linux-gnu-debug-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4216,8 +4216,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-i686-unknown-linux-gnu-debug-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4229,8 +4229,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-i686-pc-windows-msvc-shared-pgo-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4242,8 +4242,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-x86_64-apple-darwin-pgo%2Blto-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4255,8 +4255,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-x86_64-unknown-linux-gnu-debug-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4268,8 +4268,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-x86_64-unknown-linux-musl-lto-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 6, @@ -4281,8 +4281,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.9.6-x86_64-pc-windows-msvc-shared-pgo-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4294,8 +4294,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-aarch64-apple-darwin-pgo%2Blto-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4307,8 +4307,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-i686-unknown-linux-gnu-debug-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4320,8 +4320,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-i686-pc-windows-msvc-shared-pgo-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4333,8 +4333,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-x86_64-apple-darwin-pgo%2Blto-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4346,8 +4346,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-x86_64-unknown-linux-gnu-debug-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4359,8 +4359,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-x86_64-unknown-linux-musl-lto-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 5, @@ -4372,8 +4372,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.9.5-x86_64-pc-windows-msvc-shared-pgo-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4385,8 +4385,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-aarch64-apple-darwin-pgo%2Blto-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4398,8 +4398,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-i686-unknown-linux-gnu-debug-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4411,8 +4411,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-i686-pc-windows-msvc-shared-pgo-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4424,8 +4424,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-x86_64-apple-darwin-pgo%2Blto-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4437,8 +4437,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-x86_64-unknown-linux-gnu-debug-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4450,8 +4450,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-x86_64-unknown-linux-musl-lto-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 4, @@ -4463,8 +4463,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.9.4-x86_64-pc-windows-msvc-shared-pgo-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4476,8 +4476,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-aarch64-apple-darwin-pgo%2Blto-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4489,8 +4489,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-i686-pc-windows-msvc-shared-pgo-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4502,8 +4502,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-x86_64-apple-darwin-pgo%2Blto-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4515,8 +4515,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-x86_64-unknown-linux-gnu-debug-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4528,8 +4528,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-x86_64-unknown-linux-musl-lto-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 3, @@ -4541,8 +4541,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210414/cpython-3.9.3-x86_64-pc-windows-msvc-shared-pgo-20210413T2055.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4554,8 +4554,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-aarch64-apple-darwin-pgo%2Blto-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4567,8 +4567,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-i686-unknown-linux-gnu-debug-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4580,8 +4580,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-i686-pc-windows-msvc-shared-pgo-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4593,8 +4593,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-x86_64-apple-darwin-pgo%2Blto-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4606,8 +4606,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-x86_64-unknown-linux-gnu-debug-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4619,8 +4619,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-x86_64-unknown-linux-musl-lto-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 2, @@ -4632,8 +4632,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.9.2-x86_64-pc-windows-msvc-shared-pgo-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 1, @@ -4645,8 +4645,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.9.1-i686-pc-windows-msvc-shared-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 1, @@ -4658,8 +4658,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.9.1-x86_64-apple-darwin-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 1, @@ -4671,8 +4671,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.9.1-x86_64-unknown-linux-gnu-debug-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 1, @@ -4684,8 +4684,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.9.1-x86_64-unknown-linux-musl-debug-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 1, @@ -4697,8 +4697,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.9.1-x86_64-pc-windows-msvc-shared-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 0, @@ -4710,8 +4710,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-i686-pc-windows-msvc-shared-pgo-20201021T0245.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 0, @@ -4723,8 +4723,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-apple-darwin-pgo-20201020T0626.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 0, @@ -4736,8 +4736,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-unknown-linux-gnu-debug-20201020T0627.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 0, @@ -4749,8 +4749,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-unknown-linux-musl-debug-20201020T0627.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 9, patch: 0, @@ -4762,8 +4762,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-pc-windows-msvc-shared-pgo-20201021T0245.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4775,8 +4775,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("08cf698453d0a3080426a70dbb43220e915eb4401a9ea0fc798f9f27a3bf7f88") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4788,8 +4788,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("36cbe41bd9836718bb237de2a5fc1b2a02cc3c8f2c29b73b54dc7aaa160ef701") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4801,8 +4801,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("d1776a6eecc3bcf549fdbd7adcc9a1ee6e0f0dfaa8ad77f055f5972882d0d227") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4814,8 +4814,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e011239aec57e2074093a31f6fb3fee036671ab777fb9764e32bfdb869a80652") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4827,8 +4827,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("aa88b515e9b0b0e69b98070177dc89f08e2aafc0e94927416b3be45259f14a54") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4840,8 +4840,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("9c73ff563dd42389645923dd2502b95ae07f413576c5220045eb4a4afd07f6c1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 19, @@ -4853,8 +4853,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("ff0812147ab19101c219d0648cf0dbe22b3612decd6034c286451dafe5fe5134") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4866,8 +4866,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("c732c068cddcd6a008c1d6d8e35802f5bdc7323bd2eb64e77210d3d5fe4740c2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4879,8 +4879,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("6d71175a090950c2063680f250b8799ab39eb139aa1721c853d8950aadd1d4e2") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4892,8 +4892,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("9f94c7b54b97116cd308e73cda0b7a7b7fff4515932c5cbba18eeae9ec798351") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4905,8 +4905,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("4d4b65dd821ce13dcf6dfea3ad5c2d4c3d3a8c2b7dd49fc35c1d79f66238e89b") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4918,8 +4918,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("189ae3b8249c57217e3253f9fc89857e088763cf2107a3f22ab2ac2398f41a65") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4931,8 +4931,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("fa1bf64cf52d830e7b4bba486c447ee955af644d167df7c42afd169c5dc71d6a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 18, @@ -4944,8 +4944,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c63abd9365a13196eb9f65db864f95b85c1f90b770d218c1acd104e6b48a99d3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -4957,8 +4957,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("d08a542bed35fc74ac6e8f6884c8aa29a77ff2f4ed04a06dcf91578dea622f9a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -4970,8 +4970,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("eaee5a0b79cc28943e19df54f314634795aee43a6670ce99c0306893a18fa784") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -4983,8 +4983,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("61ac08680c022f180a32dc82d84548aeb92c7194a489e3b3c532dc48f999d757") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -4996,8 +4996,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("0931d8ca0e060c6ac1dfcf6bb9b6dea0ac3a9d95daf7906a88128045f4464bf8") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -5009,8 +5009,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("2c4925f5cf37d498e0d8cfe7b10591cc5f0cd80d2582f566b12006e6f96958b1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -5022,8 +5022,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f499750ab0019f36ccb4d964e222051d0d49a1d1e8dbada98abae738cf48c9dc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -5035,8 +5035,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("a316ba0b1f425b04c8dfd7a8a18a05d72ae5852732d401b16d7439bdf25caec3") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 17, @@ -5048,8 +5048,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("68c7d03de5283c4812f2706c797b2139999a28cec647bc662d1459a922059318") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5061,8 +5061,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("bfc91d0a1d6d6dfaa5a31c925aa6adae82bd1ae5eb17813a9f0a50bf9d3e6305") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5074,8 +5074,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("423d43d93e2fe33b41ad66d35426f16541f09fee9d7272ae5decf5474ebbc225") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5087,8 +5087,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9aa3e559130a47c33ee2b67f6ca69e2f10d8f70c1fd1e2871763b892372a6d9e") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5100,8 +5100,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("5de953621402c11cc7db65ba15d45779e838d7ce78e7aa8d43c7d78fff177f13") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5113,8 +5113,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("21c0f4a0fa6ee518b9f2f1901c9667e3baf45d9f84235408b7ca50499d19f56d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5126,8 +5126,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("f12f5cb38f796ca48dc73262c05506a6f21f59d24e709ea0390b18bf71c2e1f9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5139,8 +5139,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("f7d46196b44d12a26209ac74061200aac478b96c253eea93a0b9734efa642779") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 16, @@ -5152,8 +5152,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.8.16%2B20230726-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6316713c2dcb30127b38ced249fa9608830a33459580b71275a935aaa8cd5d5f") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5165,8 +5165,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("fc0f944e6f01ed649f79c873af1c317db61d2136b82081b4d7cbb7755f878035") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5178,8 +5178,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("2e80025eda686c14a9a0618ced40043c1d577a754b904fd7a382cd41abf9ca00") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5191,8 +5191,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("b8436415ea9bd9970fb766f791a14b0e14ce6351fc4604eb158f1425e8bb4a33") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5204,8 +5204,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("98bb2315c3567316c30b060d613c8d6067b368b64f08ef8fe6196341637c1d78") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5217,8 +5217,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("e4fd2fa2255295fbdcfadb8b48014fa80810305eccb246d355880aabb45cbe93") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5230,8 +5230,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("c3c8c23e34bddb4a2b90333ff17041f344401775d505700f1ceddb3ad9d589e0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5243,8 +5243,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("231b35d3c2cff0372d17cea7ff5168c0684a920b94a912ffc965c2518cacb694") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 15, @@ -5256,8 +5256,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221106/cpython-3.8.15%2B20221106-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("59beac5610e6da0848ebaccd72f91f6aaaeed65ef59606d006af909e9e79beba") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5269,8 +5269,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("d17a3fcc161345efa2ec0b4ab9c9ed6c139d29128f2e34bb636338a484aa7b72") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5282,8 +5282,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("a14d8b5cbd8e1ca45cbcb49f4bf0b0440dc86eb95b7c3da3c463a704a3b4593c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5295,8 +5295,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("631bb90fe8f2965d03400b268de90fe155ce51961296360d6578b7151aa9ef4c") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5308,8 +5308,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("e43f7a5044eac91e95df59fd08bf96f13245898876fc2afd90a081cfcd847e35") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5321,8 +5321,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("62edfea77b42e87ca2d85c482319211cd2dd68d55ba85c99f1834f7b64a60133") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5334,8 +5334,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("bd1e8e09edccaab82fbd75b457205a076847d62e3354c3d9b5abe985181047fc") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5347,8 +5347,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("c6da442aaea160179a9379b297ccb3ba09b825fc27d84577fc28e62911451e7d") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 14, @@ -5360,8 +5360,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.8.14%2B20221002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("6986b3e6edf7b37f96ea940b7ccba7b767ed3ea9b3faec2a2a60e5b2c4443314") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5373,8 +5373,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("a204e5f9e1566bdc170b163300a29fc9580d5c65cd6e896caf6500cd64471373") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5386,8 +5386,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-aarch64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("3a927205db4686c182b5e8f3fc7fd7d82ec8f61c70d5b2bfddd9673c7ddc07ba") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5399,8 +5399,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("6daf0405beae6d127a2dcae61d51a719236b861b4cabc220727e48547fd6f045") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5412,8 +5412,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("5630739d1c6fcfbf90311d236c5e46314fc4b439364429bee12d0ffc95e134fb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5425,8 +5425,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("f706a62de8582bf84b8b693c993314cd786f3e78639892cfd9a7283a526696f9") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5438,8 +5438,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("891b5d7b0e936b98a62f65bc0b28fff61ca9002125a2fc1ebb9c72f6b0056712") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5451,8 +5451,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("410f3223021d1b439cf8e4da699f868adada2066e354d88a00b5f365dc66c4bf") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 13, @@ -5464,8 +5464,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220802/cpython-3.8.13%2B20220802-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("c36b703b8b806a047ba71e5e85734ac78d204d3a2b7ebc2efcdc7d4af6f6c263") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5477,8 +5477,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("386f667f8d49b6c34aee1910cdc0b5b41883f9406f98e7d59a3753990b1cdbac") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5490,8 +5490,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-i686-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("7cfac9a57e262be3e889036d7fc570293e6d3d74411ee23e1fa9aa470d387e6a") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5503,8 +5503,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-i686-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("3e2e6c7de78b1924aad37904fed7bfbac6efa2bef05348e9be92180b2f2b1ae1") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5516,8 +5516,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", sha256: Some("cf614d96e2001d526061b3ce0569c79057fd0074ace472ff4f5f601262e08cdb") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5529,8 +5529,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-x86_64-unknown-linux-gnu-debug-full.tar.zst", sha256: Some("9ad20c520c291d08087e9afb4390f389d2b66c7fc97f23fffc1313ebafc5fee0") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5542,8 +5542,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-x86_64-unknown-linux-musl-lto-full.tar.zst", sha256: Some("3d958e3f984637d8ca4a90a2e068737b268f87fc615121a6f1808cd46ccacc48") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 12, @@ -5555,8 +5555,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20220227/cpython-3.8.12%2B20220227-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", sha256: Some("33f278416ba8074f2ca6d7f8c17b311b60537c9e6431fd47948784c2a78ea227") }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5568,8 +5568,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-i686-unknown-linux-gnu-debug-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5581,8 +5581,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-i686-pc-windows-msvc-shared-pgo-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5594,8 +5594,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-x86_64-apple-darwin-pgo%2Blto-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5607,8 +5607,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-x86_64-unknown-linux-gnu-debug-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5620,8 +5620,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-x86_64-unknown-linux-musl-lto-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 11, @@ -5633,8 +5633,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210724/cpython-3.8.11-x86_64-pc-windows-msvc-shared-pgo-20210724T1424.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5646,8 +5646,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-i686-unknown-linux-gnu-debug-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5659,8 +5659,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-i686-pc-windows-msvc-shared-pgo-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5672,8 +5672,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-x86_64-apple-darwin-pgo%2Blto-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5685,8 +5685,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-x86_64-unknown-linux-gnu-debug-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5698,8 +5698,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-x86_64-unknown-linux-musl-lto-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 10, @@ -5711,8 +5711,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210506/cpython-3.8.10-x86_64-pc-windows-msvc-shared-pgo-20210506T0943.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5724,8 +5724,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-i686-unknown-linux-gnu-debug-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5737,8 +5737,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-i686-pc-windows-msvc-shared-pgo-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5750,8 +5750,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-x86_64-apple-darwin-pgo%2Blto-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5763,8 +5763,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-x86_64-unknown-linux-gnu-debug-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5776,8 +5776,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-x86_64-unknown-linux-musl-lto-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 9, @@ -5789,8 +5789,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210415/cpython-3.8.9-x86_64-pc-windows-msvc-shared-pgo-20210414T1515.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5802,8 +5802,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-i686-unknown-linux-gnu-debug-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5815,8 +5815,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-i686-pc-windows-msvc-shared-pgo-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5828,8 +5828,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-x86_64-apple-darwin-pgo%2Blto-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5841,8 +5841,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-x86_64-unknown-linux-gnu-debug-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5854,8 +5854,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-x86_64-unknown-linux-musl-lto-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 8, @@ -5867,8 +5867,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210327/cpython-3.8.8-x86_64-pc-windows-msvc-shared-pgo-20210327T1202.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 7, @@ -5880,8 +5880,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.8.7-i686-pc-windows-msvc-shared-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 7, @@ -5893,8 +5893,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.8.7-x86_64-apple-darwin-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 7, @@ -5906,8 +5906,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.8.7-x86_64-unknown-linux-gnu-debug-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 7, @@ -5919,8 +5919,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.8.7-x86_64-unknown-linux-musl-debug-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 7, @@ -5932,8 +5932,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20210103/cpython-3.8.7-x86_64-pc-windows-msvc-shared-pgo-20210103T1125.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 6, @@ -5945,8 +5945,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.8.6-i686-pc-windows-msvc-shared-pgo-20201021T0233.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 6, @@ -5958,8 +5958,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.8.6-x86_64-apple-darwin-pgo-20201020T0626.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 6, @@ -5971,8 +5971,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.8.6-x86_64-unknown-linux-gnu-debug-20201020T0627.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 6, @@ -5984,8 +5984,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.8.6-x86_64-unknown-linux-musl-debug-20201020T0627.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 6, @@ -5997,8 +5997,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.8.6-x86_64-pc-windows-msvc-shared-pgo-20201021T0232.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 5, @@ -6010,8 +6010,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200830/cpython-3.8.5-i686-pc-windows-msvc-shared-pgo-20200830T2311.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 5, @@ -6023,8 +6023,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200823/cpython-3.8.5-x86_64-apple-darwin-pgo-20200823T2228.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 5, @@ -6036,8 +6036,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.8.5-x86_64-unknown-linux-gnu-debug-20200823T0036.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 5, @@ -6049,8 +6049,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.8.5-x86_64-unknown-linux-musl-debug-20200823T0036.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 5, @@ -6062,8 +6062,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200830/cpython-3.8.5-x86_64-pc-windows-msvc-shared-pgo-20200830T2254.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 3, @@ -6075,8 +6075,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.8.3-i686-pc-windows-msvc-shared-pgo-20200518T0154.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 3, @@ -6088,8 +6088,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200530/cpython-3.8.3-x86_64-apple-darwin-pgo-20200530T1845.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 3, @@ -6101,8 +6101,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.8.3-x86_64-unknown-linux-gnu-debug-20200518T0040.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 3, @@ -6114,8 +6114,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.8.3-x86_64-unknown-linux-musl-debug-20200518T0040.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 3, @@ -6127,8 +6127,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.8.3-x86_64-pc-windows-msvc-shared-pgo-20200517T2207.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 2, @@ -6140,8 +6140,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200418/cpython-3.8.2-i686-pc-windows-msvc-shared-pgo-20200418T2315.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 2, @@ -6153,8 +6153,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200418/cpython-3.8.2-x86_64-apple-darwin-pgo-20200418T2238.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 2, @@ -6166,8 +6166,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200418/cpython-3.8.2-x86_64-unknown-linux-gnu-debug-20200418T2305.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 8, patch: 2, @@ -6179,8 +6179,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200418/cpython-3.8.2-x86_64-pc-windows-msvc-shared-pgo-20200418T2315.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 9, @@ -6192,8 +6192,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.7.9-i686-pc-windows-msvc-shared-pgo-20200823T0159.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 9, @@ -6205,8 +6205,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200823/cpython-3.7.9-x86_64-apple-darwin-pgo-20200823T2228.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 9, @@ -6218,8 +6218,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.7.9-x86_64-unknown-linux-gnu-debug-20200823T0036.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 9, @@ -6231,8 +6231,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.7.9-x86_64-unknown-linux-musl-debug-20200823T0036.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 9, @@ -6244,8 +6244,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200822/cpython-3.7.9-x86_64-pc-windows-msvc-shared-pgo-20200823T0118.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 7, @@ -6257,8 +6257,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.7.7-i686-pc-windows-msvc-shared-pgo-20200517T2153.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 7, @@ -6270,8 +6270,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200530/cpython-3.7.7-x86_64-apple-darwin-pgo-20200530T1845.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 7, @@ -6283,8 +6283,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.7.7-x86_64-unknown-linux-gnu-debug-20200518T0040.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 7, @@ -6296,8 +6296,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.7.7-x86_64-unknown-linux-musl-debug-20200518T0040.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 7, @@ -6309,8 +6309,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200517/cpython-3.7.7-x86_64-pc-windows-msvc-shared-pgo-20200517T2128.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 6, @@ -6322,8 +6322,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200216/cpython-3.7.6-windows-x86-shared-pgo-20200217T0110.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 6, @@ -6335,8 +6335,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200216/cpython-3.7.6-macos-20200216T2344.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 6, @@ -6348,8 +6348,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200216/cpython-3.7.6-linux64-20200216T2303.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 6, @@ -6361,8 +6361,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200217/cpython-3.7.6-linux64-musl-20200218T0557.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 6, @@ -6374,8 +6374,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20200216/cpython-3.7.6-windows-amd64-shared-pgo-20200217T0022.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 5, @@ -6387,8 +6387,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20191025/cpython-3.7.5-windows-x86-20191025T0549.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 5, @@ -6400,8 +6400,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20191025/cpython-3.7.5-macos-20191026T0535.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 5, @@ -6413,8 +6413,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20191025/cpython-3.7.5-linux64-20191025T0506.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 5, @@ -6426,8 +6426,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20191025/cpython-3.7.5-linux64-musl-20191026T0603.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 5, @@ -6439,8 +6439,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20191025/cpython-3.7.5-windows-amd64-20191025T0540.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 4, @@ -6452,8 +6452,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190816/cpython-3.7.4-windows-x86-20190817T0235.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 4, @@ -6465,8 +6465,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190816/cpython-3.7.4-macos-20190817T0220.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 4, @@ -6478,8 +6478,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190816/cpython-3.7.4-linux64-20190817T0224.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 4, @@ -6491,8 +6491,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190816/cpython-3.7.4-linux64-musl-20190817T0227.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 4, @@ -6504,8 +6504,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190816/cpython-3.7.4-windows-amd64-20190817T0227.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 3, @@ -6517,8 +6517,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190617/cpython-3.7.3-windows-x86-20190709T0348.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 3, @@ -6530,8 +6530,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190617/cpython-3.7.3-macos-20190618T0523.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 3, @@ -6543,8 +6543,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190617/cpython-3.7.3-linux64-20190618T0324.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 3, @@ -6556,8 +6556,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190617/cpython-3.7.3-linux64-musl-20190618T0400.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 3, @@ -6569,8 +6569,8 @@ pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ url: "https://github.com/indygreg/python-build-standalone/releases/download/20190617/cpython-3.7.3-windows-amd64-20190618T0516.tar.zst", sha256: None }, - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: 3, minor: 7, patch: 1, diff --git a/crates/uv-toolchain/src/downloads.inc.mustache b/crates/uv-python/src/downloads.inc.mustache similarity index 87% rename from crates/uv-toolchain/src/downloads.inc.mustache rename to crates/uv-python/src/downloads.inc.mustache index 770c27d37..2549177d9 100644 --- a/crates/uv-toolchain/src/downloads.inc.mustache +++ b/crates/uv-python/src/downloads.inc.mustache @@ -3,10 +3,10 @@ // Generated with `{{generated_with}}` // From template at `{{generated_from}}` -pub(crate) const PYTHON_DOWNLOADS: &[PythonDownload] = &[ +pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[ {{#versions}} - PythonDownload { - key: ToolchainKey { + ManagedPythonDownload { + key: PythonInstallationKey { major: {{value.major}}, minor: {{value.minor}}, patch: {{value.patch}}, diff --git a/crates/uv-toolchain/src/downloads.rs b/crates/uv-python/src/downloads.rs similarity index 86% rename from crates/uv-toolchain/src/downloads.rs rename to crates/uv-python/src/downloads.rs index a6ef39579..0c20c054e 100644 --- a/crates/uv-toolchain/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -6,9 +6,9 @@ use std::str::FromStr; use crate::implementation::{ Error as ImplementationError, ImplementationName, LenientImplementationName, }; +use crate::installation::PythonInstallationKey; use crate::platform::{self, Arch, Libc, Os}; -use crate::toolchain::ToolchainKey; -use crate::{Interpreter, PythonVersion, ToolchainRequest, VersionRequest}; +use crate::{Interpreter, PythonRequest, PythonVersion, VersionRequest}; use thiserror::Error; use uv_client::WrappedReqwestError; @@ -45,26 +45,26 @@ pub enum Error { #[source] err: io::Error, }, - #[error("Failed to read toolchain directory: {0}", dir.user_display())] + #[error("Failed to read managed Python installation directory: {0}", dir.user_display())] ReadError { dir: PathBuf, #[source] err: io::Error, }, - #[error("Failed to parse toolchain directory name: {0}")] + #[error("Failed to parse managed Python directory name: {0}")] NameError(String), #[error("Failed to parse request part")] InvalidRequestPlatform(#[from] platform::Error), - #[error("Cannot download toolchain for request: {0}")] - InvalidRequestKind(ToolchainRequest), + #[error("Cannot download managed Python for request: {0}")] + InvalidRequestKind(PythonRequest), // TODO(zanieb): Implement display for `PythonDownloadRequest` #[error("No download found for request: {0:?}")] NoDownloadFound(PythonDownloadRequest), } #[derive(Debug, PartialEq)] -pub struct PythonDownload { - key: ToolchainKey, +pub struct ManagedPythonDownload { + key: PythonInstallationKey, url: &'static str, sha256: Option<&'static str>, } @@ -125,30 +125,30 @@ impl PythonDownloadRequest { self } - /// Construct a new [`PythonDownloadRequest`] from a [`ToolchainRequest`] if possible. + /// Construct a new [`PythonDownloadRequest`] from a [`PythonRequest`] if possible. /// /// Returns [`None`] if the request kind is not compatible with a download, e.g., it is /// a request for a specific directory or executable name. - pub fn try_from_request(request: &ToolchainRequest) -> Option { + pub fn try_from_request(request: &PythonRequest) -> Option { Self::from_request(request).ok() } - /// Construct a new [`PythonDownloadRequest`] from a [`ToolchainRequest`]. - pub fn from_request(request: &ToolchainRequest) -> Result { + /// Construct a new [`PythonDownloadRequest`] from a [`PythonRequest`]. + pub fn from_request(request: &PythonRequest) -> Result { match request { - ToolchainRequest::Version(version) => Ok(Self::default().with_version(version.clone())), - ToolchainRequest::Implementation(implementation) => { + PythonRequest::Version(version) => Ok(Self::default().with_version(version.clone())), + PythonRequest::Implementation(implementation) => { Ok(Self::default().with_implementation(*implementation)) } - ToolchainRequest::ImplementationVersion(implementation, version) => Ok(Self::default() + PythonRequest::ImplementationVersion(implementation, version) => Ok(Self::default() .with_implementation(*implementation) .with_version(version.clone())), - ToolchainRequest::Key(request) => Ok(request.clone()), - ToolchainRequest::Any => Ok(Self::default()), - // We can't download a toolchain for these request kinds - ToolchainRequest::Directory(_) - | ToolchainRequest::ExecutableName(_) - | ToolchainRequest::File(_) => Err(Error::InvalidRequestKind(request.clone())), + PythonRequest::Key(request) => Ok(request.clone()), + PythonRequest::Any => Ok(Self::default()), + // We can't download a managed installation for these request kinds + PythonRequest::Directory(_) + | PythonRequest::ExecutableName(_) + | PythonRequest::File(_) => Err(Error::InvalidRequestKind(request.clone())), } } @@ -204,11 +204,12 @@ impl PythonDownloadRequest { } /// Iterate over all [`PythonDownload`]'s that match this request. - pub fn iter_downloads(&self) -> impl Iterator + '_ { - PythonDownload::iter_all().filter(move |download| self.satisfied_by_download(download)) + pub fn iter_downloads(&self) -> impl Iterator + '_ { + ManagedPythonDownload::iter_all() + .filter(move |download| self.satisfied_by_download(download)) } - pub fn satisfied_by_key(&self, key: &ToolchainKey) -> bool { + pub fn satisfied_by_key(&self, key: &PythonInstallationKey) -> bool { if let Some(arch) = &self.arch { if key.arch != *arch { return false; @@ -232,7 +233,7 @@ impl PythonDownloadRequest { true } - pub fn satisfied_by_download(&self, download: &PythonDownload) -> bool { + pub fn satisfied_by_download(&self, download: &ManagedPythonDownload) -> bool { self.satisfied_by_key(download.key()) } @@ -356,9 +357,11 @@ pub enum DownloadResult { Fetched(PathBuf), } -impl PythonDownload { +impl ManagedPythonDownload { /// Return the first [`PythonDownload`] matching a request, if any. - pub fn from_request(request: &PythonDownloadRequest) -> Result<&'static PythonDownload, Error> { + pub fn from_request( + request: &PythonDownloadRequest, + ) -> Result<&'static ManagedPythonDownload, Error> { request .iter_downloads() .next() @@ -366,7 +369,7 @@ impl PythonDownload { } /// Iterate over all [`PythonDownload`]'s. - pub fn iter_all() -> impl Iterator { + pub fn iter_all() -> impl Iterator { PYTHON_DOWNLOADS.iter() } @@ -374,7 +377,7 @@ impl PythonDownload { self.url } - pub fn key(&self) -> &ToolchainKey { + pub fn key(&self) -> &PythonInstallationKey { &self.key } @@ -465,7 +468,7 @@ impl From for Error { } } -impl Display for PythonDownload { +impl Display for ManagedPythonDownload { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.key) } diff --git a/crates/uv-toolchain/src/environment.rs b/crates/uv-python/src/environment.rs similarity index 86% rename from crates/uv-toolchain/src/environment.rs rename to crates/uv-python/src/environment.rs index 1c23ee4e6..96a213dfd 100644 --- a/crates/uv-toolchain/src/environment.rs +++ b/crates/uv-python/src/environment.rs @@ -7,12 +7,12 @@ use std::sync::Arc; use uv_cache::Cache; use uv_fs::{LockedFile, Simplified}; -use crate::discovery::find_toolchain; -use crate::toolchain::Toolchain; +use crate::discovery::find_python_installation; +use crate::installation::PythonInstallation; use crate::virtualenv::{virtualenv_python_executable, PyVenvConfiguration}; use crate::{ - EnvironmentPreference, Error, Interpreter, Prefix, Target, ToolchainNotFound, - ToolchainPreference, ToolchainRequest, + EnvironmentPreference, Error, Interpreter, Prefix, PythonNotFound, PythonPreference, + PythonRequest, Target, }; /// A Python environment, consisting of a Python [`Interpreter`] and its associated paths. @@ -27,15 +27,15 @@ struct PythonEnvironmentShared { /// The result of failed environment discovery. /// -/// Generally this is cast from [`ToolchainNotFound`] by [`PythonEnvironment::find`]. +/// Generally this is cast from [`PythonNotFound`] by [`PythonEnvironment::find`]. #[derive(Clone, Debug, Error)] pub struct EnvironmentNotFound { - request: ToolchainRequest, + request: PythonRequest, preference: EnvironmentPreference, } -impl From for EnvironmentNotFound { - fn from(value: ToolchainNotFound) -> Self { +impl From for EnvironmentNotFound { + fn from(value: PythonNotFound) -> Self { Self { request: value.request, preference: value.environment_preference, @@ -59,7 +59,7 @@ impl fmt::Display for EnvironmentNotFound { EnvironmentPreference::OnlyVirtual => "virtual environment", }; match self.request { - ToolchainRequest::Any => { + PythonRequest::Any => { write!(f, "No {environment} found") } _ => { @@ -72,24 +72,24 @@ impl fmt::Display for EnvironmentNotFound { impl PythonEnvironment { /// Find a [`PythonEnvironment`] matching the given request and preference. /// - /// If looking for a Python toolchain to create a new environment, use [`Toolchain::find`] + /// If looking for a Python interpreter to create a new environment, use [`PythonInstallation::find`] /// instead. pub fn find( - request: &ToolchainRequest, + request: &PythonRequest, preference: EnvironmentPreference, cache: &Cache, ) -> Result { - let toolchain = match find_toolchain( + let installation = match find_python_installation( request, preference, - // Ignore managed toolchains when looking for environments - ToolchainPreference::OnlySystem, + // Ignore managed installations when looking for environments + PythonPreference::OnlySystem, cache, )? { - Ok(toolchain) => toolchain, + Ok(installation) => installation, Err(err) => return Err(EnvironmentNotFound::from(err).into()), }; - Ok(Self::from_toolchain(toolchain)) + Ok(Self::from_installation(installation)) } /// Create a [`PythonEnvironment`] from the virtual environment at the given root. @@ -99,7 +99,7 @@ impl PythonEnvironment { Err(err) if err.kind() == std::io::ErrorKind::NotFound => { return Err(Error::MissingEnvironment(EnvironmentNotFound { preference: EnvironmentPreference::Any, - request: ToolchainRequest::Directory(root.as_ref().to_owned()), + request: PythonRequest::Directory(root.as_ref().to_owned()), })); } Err(err) => return Err(Error::Discovery(err.into())), @@ -113,9 +113,9 @@ impl PythonEnvironment { }))) } - /// Create a [`PythonEnvironment`] from an existing [`Toolchain`]. - pub fn from_toolchain(toolchain: Toolchain) -> Self { - Self::from_interpreter(toolchain.into_interpreter()) + /// Create a [`PythonEnvironment`] from an existing [`PythonInstallation`]. + pub fn from_installation(installation: PythonInstallation) -> Self { + Self::from_interpreter(installation.into_interpreter()) } /// Create a [`PythonEnvironment`] from an existing [`Interpreter`]. diff --git a/crates/uv-toolchain/src/implementation.rs b/crates/uv-python/src/implementation.rs similarity index 100% rename from crates/uv-toolchain/src/implementation.rs rename to crates/uv-python/src/implementation.rs diff --git a/crates/uv-toolchain/src/toolchain.rs b/crates/uv-python/src/installation.rs similarity index 62% rename from crates/uv-toolchain/src/toolchain.rs rename to crates/uv-python/src/installation.rs index ef2f42bed..48dcd2f04 100644 --- a/crates/uv-toolchain/src/toolchain.rs +++ b/crates/uv-python/src/installation.rs @@ -8,27 +8,25 @@ use uv_client::BaseClientBuilder; use uv_cache::Cache; use crate::discovery::{ - find_best_toolchain, find_toolchain, EnvironmentPreference, ToolchainRequest, + find_best_python_installation, find_python_installation, EnvironmentPreference, PythonRequest, }; -use crate::downloads::{DownloadResult, PythonDownload, PythonDownloadRequest}; +use crate::downloads::{DownloadResult, ManagedPythonDownload, PythonDownloadRequest}; use crate::implementation::LenientImplementationName; -use crate::managed::{InstalledToolchain, InstalledToolchains}; +use crate::managed::{ManagedPythonInstallation, ManagedPythonInstallations}; use crate::platform::{Arch, Libc, Os}; -use crate::{ - Error, Interpreter, PythonVersion, ToolchainFetch, ToolchainPreference, ToolchainSource, -}; +use crate::{Error, Interpreter, PythonFetch, PythonPreference, PythonSource, PythonVersion}; /// A Python interpreter and accompanying tools. #[derive(Clone, Debug)] -pub struct Toolchain { +pub struct PythonInstallation { // Public in the crate for test assertions - pub(crate) source: ToolchainSource, + pub(crate) source: PythonSource, pub(crate) interpreter: Interpreter, } -impl Toolchain { - /// Create a new [`Toolchain`] from a source, interpreter tuple. - pub(crate) fn from_tuple(tuple: (ToolchainSource, Interpreter)) -> Self { +impl PythonInstallation { + /// Create a new [`PythonInstallation`] from a source, interpreter tuple. + pub(crate) fn from_tuple(tuple: (PythonSource, Interpreter)) -> Self { let (source, interpreter) = tuple; Self { source, @@ -36,9 +34,9 @@ impl Toolchain { } } - /// Find an installed [`Toolchain`]. + /// Find an installed [`PythonInstallation`]. /// - /// This is the standard interface for discovering a Python toolchain for creating + /// This is the standard interface for discovering a Python installation for creating /// an environment. If interested in finding an existing environment, see /// [`PythonEnvironment::find`] instead. /// @@ -47,26 +45,26 @@ impl Toolchain { /// but if you want to allow an interpreter from a virtual environment if it satisfies the request, /// then use [`EnvironmentPreference::Any`]. /// - /// See [`find_toolchain`] for implementation details. + /// See [`find_installation`] for implementation details. pub fn find( - request: &ToolchainRequest, + request: &PythonRequest, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &Cache, ) -> Result { - let toolchain = find_toolchain(request, environments, preference, cache)??; - Ok(toolchain) + let installation = find_python_installation(request, environments, preference, cache)??; + Ok(installation) } - /// Find an installed [`Toolchain`] that satisfies a requested version, if the request cannot - /// be satisfied, fallback to the best available toolchain. + /// Find an installed [`PythonInstallation`] that satisfies a requested version, if the request cannot + /// be satisfied, fallback to the best available Python installation. pub fn find_best( - request: &ToolchainRequest, + request: &PythonRequest, environments: EnvironmentPreference, - preference: ToolchainPreference, + preference: PythonPreference, cache: &Cache, ) -> Result { - Ok(find_best_toolchain( + Ok(find_best_python_installation( request, environments, preference, @@ -74,33 +72,33 @@ impl Toolchain { )??) } - /// Find or fetch a [`Toolchain`]. + /// Find or fetch a [`PythonInstallation`]. /// - /// Unlike [`Toolchain::find`], if the toolchain is not installed it will be installed automatically. + /// Unlike [`PythonInstallation::find`], if the required Python is not installed it will be installed automatically. pub async fn find_or_fetch<'a>( - request: Option, + request: Option, environments: EnvironmentPreference, - preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + preference: PythonPreference, + python_fetch: PythonFetch, client_builder: &BaseClientBuilder<'a>, cache: &Cache, ) -> Result { let request = request.unwrap_or_default(); - // Perform a fetch aggressively if managed toolchains are preferred - if matches!(preference, ToolchainPreference::Managed) && toolchain_fetch.is_automatic() { + // Perform a fetch aggressively if managed Python is preferred + if matches!(preference, PythonPreference::Managed) && python_fetch.is_automatic() { if let Some(request) = PythonDownloadRequest::try_from_request(&request) { return Self::fetch(request, client_builder, cache).await; } } - // Search for the toolchain + // Search for the installation match Self::find(&request, environments, preference, cache) { Ok(venv) => Ok(venv), // If missing and allowed, perform a fetch - err @ Err(Error::MissingToolchain(_)) + err @ Err(Error::MissingPython(_)) if preference.allows_managed() - && toolchain_fetch.is_automatic() + && python_fetch.is_automatic() && client_builder.connectivity.is_online() => { if let Some(request) = PythonDownloadRequest::try_from_request(&request) { @@ -114,51 +112,51 @@ impl Toolchain { } } - /// Download and install the requested toolchain. + /// Download and install the requested installation. pub async fn fetch<'a>( request: PythonDownloadRequest, client_builder: &BaseClientBuilder<'a>, cache: &Cache, ) -> Result { - let toolchains = InstalledToolchains::from_settings()?.init()?; - let toolchain_dir = toolchains.root(); - let _lock = toolchains.acquire_lock()?; + let installations = ManagedPythonInstallations::from_settings()?.init()?; + let installations_dir = installations.root(); + let _lock = installations.acquire_lock()?; - let download = PythonDownload::from_request(&request)?; + let download = ManagedPythonDownload::from_request(&request)?; let client = client_builder.build(); - info!("Fetching requested toolchain..."); - let result = download.fetch(&client, toolchain_dir).await?; + info!("Fetching requested Python..."); + let result = download.fetch(&client, installations_dir).await?; let path = match result { DownloadResult::AlreadyAvailable(path) => path, DownloadResult::Fetched(path) => path, }; - let installed = InstalledToolchain::new(path)?; + let installed = ManagedPythonInstallation::new(path)?; installed.ensure_externally_managed()?; Ok(Self { - source: ToolchainSource::Managed, + source: PythonSource::Managed, interpreter: Interpreter::query(installed.executable(), cache)?, }) } - /// Create a [`Toolchain`] from an existing [`Interpreter`]. + /// Create a [`PythonInstallation`] from an existing [`Interpreter`]. pub fn from_interpreter(interpreter: Interpreter) -> Self { Self { - source: ToolchainSource::ProvidedPath, + source: PythonSource::ProvidedPath, interpreter, } } - /// Return the [`ToolchainSource`] of the toolchain, indicating where it was found. - pub fn source(&self) -> &ToolchainSource { + /// Return the [`PythonSource`] of the Python installation, indicating where it was found. + pub fn source(&self) -> &PythonSource { &self.source } - pub fn key(&self) -> ToolchainKey { - ToolchainKey::new( + pub fn key(&self) -> PythonInstallationKey { + PythonInstallationKey::new( LenientImplementationName::from(self.interpreter.implementation_name()), self.interpreter.python_major(), self.interpreter.python_minor(), @@ -169,32 +167,32 @@ impl Toolchain { ) } - /// Return the Python [`Version`] of the toolchain as reported by its interpreter. + /// Return the Python [`Version`] of the Python installation as reported by its interpreter. pub fn python_version(&self) -> &Version { self.interpreter.python_version() } - /// Return the [`LenientImplementationName`] of the toolchain as reported by its interpreter. + /// Return the [`LenientImplementationName`] of the Python installation as reported by its interpreter. pub fn implementation(&self) -> LenientImplementationName { LenientImplementationName::from(self.interpreter.implementation_name()) } - /// Return the [`Arch`] of the toolchain as reported by its interpreter. + /// Return the [`Arch`] of the Python installation as reported by its interpreter. pub fn arch(&self) -> Arch { Arch::from(&self.interpreter.platform().arch()) } - /// Return the [`Libc`] of the toolchain as reported by its interpreter. + /// Return the [`Libc`] of the Python installation as reported by its interpreter. pub fn libc(&self) -> Libc { Libc::from(self.interpreter.platform().os()) } - /// Return the [`Os`] of the toolchain as reported by its interpreter. + /// Return the [`Os`] of the Python installation as reported by its interpreter. pub fn os(&self) -> Os { Os::from(self.interpreter.platform().os()) } - /// Return the [`Interpreter`] for the toolchain. + /// Return the [`Interpreter`] for the Python installation. pub fn interpreter(&self) -> &Interpreter { &self.interpreter } @@ -205,13 +203,13 @@ impl Toolchain { } #[derive(Error, Debug)] -pub enum ToolchainKeyError { - #[error("Failed to parse toolchain key `{0}`: {1}")] +pub enum PythonInstallationKeyError { + #[error("Failed to parse Python installation key `{0}`: {1}")] ParseError(String, String), } #[derive(Debug, Clone, PartialEq, Eq)] -pub struct ToolchainKey { +pub struct PythonInstallationKey { pub(crate) implementation: LenientImplementationName, pub(crate) major: u8, pub(crate) minor: u8, @@ -221,7 +219,7 @@ pub struct ToolchainKey { pub(crate) libc: Libc, } -impl ToolchainKey { +impl PythonInstallationKey { pub fn new( implementation: LenientImplementationName, major: u8, @@ -248,7 +246,7 @@ impl ToolchainKey { pub fn version(&self) -> PythonVersion { PythonVersion::from_str(&format!("{}.{}.{}", self.major, self.minor, self.patch)) - .expect("Toolchain keys must have valid Python versions") + .expect("Python installation keys must have valid Python versions") } pub fn arch(&self) -> &Arch { @@ -264,7 +262,7 @@ impl ToolchainKey { } } -impl fmt::Display for ToolchainKey { +impl fmt::Display for PythonInstallationKey { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, @@ -274,13 +272,13 @@ impl fmt::Display for ToolchainKey { } } -impl FromStr for ToolchainKey { - type Err = ToolchainKeyError; +impl FromStr for PythonInstallationKey { + type Err = PythonInstallationKeyError; fn from_str(key: &str) -> Result { let parts = key.split('-').collect::>(); let [implementation, version, os, arch, libc] = parts.as_slice() else { - return Err(ToolchainKeyError::ParseError( + return Err(PythonInstallationKeyError::ParseError( key.to_string(), "not enough `-`-separated values".to_string(), )); @@ -289,15 +287,18 @@ impl FromStr for ToolchainKey { let implementation = LenientImplementationName::from(*implementation); let os = Os::from_str(os).map_err(|err| { - ToolchainKeyError::ParseError(key.to_string(), format!("invalid OS: {err}")) + PythonInstallationKeyError::ParseError(key.to_string(), format!("invalid OS: {err}")) })?; let arch = Arch::from_str(arch).map_err(|err| { - ToolchainKeyError::ParseError(key.to_string(), format!("invalid architecture: {err}")) + PythonInstallationKeyError::ParseError( + key.to_string(), + format!("invalid architecture: {err}"), + ) })?; let libc = Libc::from_str(libc).map_err(|err| { - ToolchainKeyError::ParseError(key.to_string(), format!("invalid libc: {err}")) + PythonInstallationKeyError::ParseError(key.to_string(), format!("invalid libc: {err}")) })?; let [major, minor, patch] = version @@ -305,13 +306,13 @@ impl FromStr for ToolchainKey { .map(str::parse::) .collect::, _>>() .map_err(|err| { - ToolchainKeyError::ParseError( + PythonInstallationKeyError::ParseError( key.to_string(), format!("invalid Python version: {err}"), ) })?[..] else { - return Err(ToolchainKeyError::ParseError( + return Err(PythonInstallationKeyError::ParseError( key.to_string(), "invalid Python version: expected `..`".to_string(), )); @@ -329,12 +330,12 @@ impl FromStr for ToolchainKey { } } -impl PartialOrd for ToolchainKey { +impl PartialOrd for PythonInstallationKey { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl Ord for ToolchainKey { +impl Ord for PythonInstallationKey { fn cmp(&self, other: &Self) -> std::cmp::Ordering { self.to_string().cmp(&other.to_string()) } diff --git a/crates/uv-toolchain/src/interpreter.rs b/crates/uv-python/src/interpreter.rs similarity index 100% rename from crates/uv-toolchain/src/interpreter.rs rename to crates/uv-python/src/interpreter.rs diff --git a/crates/uv-toolchain/src/lib.rs b/crates/uv-python/src/lib.rs similarity index 69% rename from crates/uv-toolchain/src/lib.rs rename to crates/uv-python/src/lib.rs index 6b392056c..c5f5aed67 100644 --- a/crates/uv-toolchain/src/lib.rs +++ b/crates/uv-python/src/lib.rs @@ -2,17 +2,17 @@ use thiserror::Error; pub use crate::discovery::{ - find_toolchains, EnvironmentPreference, Error as DiscoveryError, SystemPython, ToolchainFetch, - ToolchainNotFound, ToolchainPreference, ToolchainRequest, ToolchainSource, VersionRequest, + find_python_installations, EnvironmentPreference, Error as DiscoveryError, PythonFetch, + PythonNotFound, PythonPreference, PythonRequest, PythonSource, VersionRequest, }; pub use crate::environment::PythonEnvironment; pub use crate::implementation::ImplementationName; +pub use crate::installation::PythonInstallation; pub use crate::interpreter::{Error as InterpreterError, Interpreter}; pub use crate::pointer_size::PointerSize; pub use crate::prefix::Prefix; pub use crate::python_version::PythonVersion; pub use crate::target::Target; -pub use crate::toolchain::Toolchain; pub use crate::version_files::{request_from_version_file, requests_from_version_file}; pub use crate::virtualenv::{Error as VirtualEnvError, PyVenvConfiguration, VirtualEnvironment}; @@ -20,6 +20,7 @@ mod discovery; pub mod downloads; mod environment; mod implementation; +mod installation; mod interpreter; pub mod managed; pub mod platform; @@ -28,7 +29,6 @@ mod prefix; mod py_launcher; mod python_version; mod target; -mod toolchain; mod version_files; mod virtualenv; @@ -60,17 +60,17 @@ pub enum Error { PyLauncher(#[from] py_launcher::Error), #[error(transparent)] - ManagedToolchain(#[from] managed::Error), + ManagedPython(#[from] managed::Error), #[error(transparent)] Download(#[from] downloads::Error), // TODO(zanieb) We might want to ensure this is always wrapped in another type #[error(transparent)] - KeyError(#[from] toolchain::ToolchainKeyError), + KeyError(#[from] installation::PythonInstallationKeyError), #[error(transparent)] - MissingToolchain(#[from] ToolchainNotFound), + MissingPython(#[from] PythonNotFound), #[error(transparent)] MissingEnvironment(#[from] environment::EnvironmentNotFound), @@ -96,19 +96,21 @@ mod tests { use uv_cache::Cache; use crate::{ - discovery::{find_best_toolchain, find_toolchain, EnvironmentPreference}, - ToolchainPreference, + discovery::{ + find_best_python_installation, find_python_installation, EnvironmentPreference, + }, + PythonPreference, }; use crate::{ - implementation::ImplementationName, managed::InstalledToolchains, toolchain::Toolchain, - virtualenv::virtualenv_python_executable, PythonVersion, ToolchainNotFound, - ToolchainRequest, ToolchainSource, + implementation::ImplementationName, installation::PythonInstallation, + managed::ManagedPythonInstallations, virtualenv::virtualenv_python_executable, + PythonNotFound, PythonRequest, PythonSource, PythonVersion, }; struct TestContext { tempdir: TempDir, cache: Cache, - toolchains: InstalledToolchains, + installations: ManagedPythonInstallations, search_path: Option>, workdir: ChildPath, } @@ -122,7 +124,7 @@ mod tests { Ok(Self { tempdir, cache: Cache::temp()?, - toolchains: InstalledToolchains::temp()?, + installations: ManagedPythonInstallations::temp()?, search_path: None, workdir, }) @@ -171,8 +173,11 @@ mod tests { // Ignore active virtual environments (i.e. that the dev is using) ("VIRTUAL_ENV", None), ("PATH", path.as_deref()), - // Use the temporary toolchain directory - ("UV_TOOLCHAIN_DIR", Some(self.toolchains.root().as_os_str())), + // Use the temporary python directory + ( + "UV_PYTHON_INSTALL_DIR", + Some(self.installations.root().as_os_str()), + ), // Set a working directory ("PWD", Some(self.workdir.path().as_os_str())), ]; @@ -400,34 +405,34 @@ mod tests { } #[test] - fn find_toolchain_empty_path() -> Result<()> { + fn find_python_empty_path() -> Result<()> { let mut context = TestContext::new()?; context.search_path = Some(vec![]); let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) }); assert!( - matches!(result, Ok(Err(ToolchainNotFound { .. }))), + matches!(result, Ok(Err(PythonNotFound { .. }))), "With an empty path, no Python installation should be detected got {result:?}" ); context.search_path = None; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) }); assert!( - matches!(result, Ok(Err(ToolchainNotFound { .. }))), + matches!(result, Ok(Err(PythonNotFound { .. }))), "With an unset path, no Python installation should be detected got {result:?}" ); @@ -435,7 +440,7 @@ mod tests { } #[test] - fn find_toolchain_unexecutable_file() -> Result<()> { + fn find_python_unexecutable_file() -> Result<()> { let mut context = TestContext::new()?; context .new_search_path_directory("path")? @@ -443,17 +448,17 @@ mod tests { .touch()?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) }); assert!( matches!( result, - Ok(Err(ToolchainNotFound { .. })) + Ok(Err(PythonNotFound { .. })) ), "With an non-executable Python, no Python installation should be detected; got {result:?}" ); @@ -462,23 +467,23 @@ mod tests { } #[test] - fn find_toolchain_valid_executable() -> Result<()> { + fn find_python_valid_executable() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.12.1"])?; let interpreter = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) })??; assert!( matches!( interpreter, - Toolchain { - source: ToolchainSource::SearchPath, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), @@ -489,7 +494,7 @@ mod tests { } #[test] - fn find_toolchain_valid_executable_after_invalid() -> Result<()> { + fn find_python_valid_executable_after_invalid() -> Result<()> { let mut context = TestContext::new()?; let children = context.new_search_path_directories(&[ "query-parse-error", @@ -518,39 +523,39 @@ mod tests { // An empty directory at `children[2]` // An good interpreter! - let python = children[3].join(format!("python{}", env::consts::EXE_SUFFIX)); + let python_path = children[3].join(format!("python{}", env::consts::EXE_SUFFIX)); TestContext::create_mock_interpreter( - &python, + &python_path, &PythonVersion::from_str("3.12.1").unwrap(), ImplementationName::default(), true, )?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should skip the bad executables in favor of the good one; got {toolchain:?}" + "We should skip the bad executables in favor of the good one; got {python:?}" ); - assert_eq!(toolchain.interpreter().sys_executable(), python); + assert_eq!(python.interpreter().sys_executable(), python_path); Ok(()) } #[test] - fn find_toolchain_only_python2_executable() -> Result<()> { + fn find_python_only_python2_executable() -> Result<()> { let mut context = TestContext::new()?; let python = context .new_search_path_directory("python2")? @@ -558,24 +563,24 @@ mod tests { TestContext::create_mock_python2_interpreter(&python)?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), + matches!(result, Err(PythonNotFound { .. })), // TODO(zanieb): We could improve the error handling to hint this to the user - "If only Python 2 is available, we should not find a toolchain; got {result:?}" + "If only Python 2 is available, we should not find a python; got {result:?}" ); Ok(()) } #[test] - fn find_toolchain_skip_python2_executable() -> Result<()> { + fn find_python_skip_python2_executable() -> Result<()> { let mut context = TestContext::new()?; let python2 = context @@ -593,47 +598,47 @@ mod tests { true, )?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::default(), + PythonPreference::default(), &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should skip the Python 2 installation and find the Python 3 interpreter; got {toolchain:?}" + "We should skip the Python 2 installation and find the Python 3 interpreter; got {python:?}" ); - assert_eq!(toolchain.interpreter().sys_executable(), python3.path()); + assert_eq!(python.interpreter().sys_executable(), python3.path()); Ok(()) } #[test] - fn find_toolchain_system_python_allowed() -> Result<()> { + fn find_python_system_python_allowed() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (false, ImplementationName::CPython, "python", "3.10.0"), (true, ImplementationName::CPython, "python", "3.10.1"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "Should find the first interpreter regardless of system" ); @@ -645,16 +650,16 @@ mod tests { (false, ImplementationName::CPython, "python", "3.10.0"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "Should find the first interpreter regardless of system" ); @@ -663,23 +668,23 @@ mod tests { } #[test] - fn find_toolchain_system_python_required() -> Result<()> { + fn find_python_system_python_required() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (false, ImplementationName::CPython, "python", "3.10.0"), (true, ImplementationName::CPython, "python", "3.10.1"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "Should skip the virtual environment" ); @@ -688,23 +693,23 @@ mod tests { } #[test] - fn find_toolchain_system_python_disallowed() -> Result<()> { + fn find_python_system_python_disallowed() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (true, ImplementationName::CPython, "python", "3.10.0"), (false, ImplementationName::CPython, "python", "3.10.1"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "Should skip the system Python" ); @@ -713,31 +718,31 @@ mod tests { } #[test] - fn find_toolchain_version_minor() -> Result<()> { + fn find_python_version_minor() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2", "3.12.3"])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("3.11"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("3.11"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should find a toolchain; got {toolchain:?}" + "We should find a python; got {python:?}" ); assert_eq!( - &toolchain.interpreter().python_full_version().to_string(), + &python.interpreter().python_full_version().to_string(), "3.11.2", "We should find the correct interpreter for the request" ); @@ -746,31 +751,31 @@ mod tests { } #[test] - fn find_toolchain_version_patch() -> Result<()> { + fn find_python_version_patch() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.3", "3.11.2", "3.12.3"])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("3.11.2"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("3.11.2"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should find a toolchain; got {toolchain:?}" + "We should find a python; got {python:?}" ); assert_eq!( - &toolchain.interpreter().python_full_version().to_string(), + &python.interpreter().python_full_version().to_string(), "3.11.2", "We should find the correct interpreter for the request" ); @@ -779,73 +784,73 @@ mod tests { } #[test] - fn find_toolchain_version_minor_no_match() -> Result<()> { + fn find_python_version_minor_no_match() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2", "3.12.3"])?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("3.9"), + find_python_installation( + &PythonRequest::parse("3.9"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), - "We should not find a toolchain; got {result:?}" + matches!(result, Err(PythonNotFound { .. })), + "We should not find a python; got {result:?}" ); Ok(()) } #[test] - fn find_toolchain_version_patch_no_match() -> Result<()> { + fn find_python_version_patch_no_match() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2", "3.12.3"])?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("3.11.9"), + find_python_installation( + &PythonRequest::parse("3.11.9"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), - "We should not find a toolchain; got {result:?}" + matches!(result, Err(PythonNotFound { .. })), + "We should not find a python; got {result:?}" ); Ok(()) } #[test] - fn find_best_toolchain_version_patch_exact() -> Result<()> { + fn find_best_python_version_patch_exact() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2", "3.11.4", "3.11.3", "3.12.5"])?; - let toolchain = context.run(|| { - find_best_toolchain( - &ToolchainRequest::parse("3.11.3"), + let python = context.run(|| { + find_best_python_installation( + &PythonRequest::parse("3.11.3"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should find a toolchain; got {toolchain:?}" + "We should find a python; got {python:?}" ); assert_eq!( - &toolchain.interpreter().python_full_version().to_string(), + &python.interpreter().python_full_version().to_string(), "3.11.3", "We should prefer the exact request" ); @@ -854,31 +859,31 @@ mod tests { } #[test] - fn find_best_toolchain_version_patch_fallback() -> Result<()> { + fn find_best_python_version_patch_fallback() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2", "3.11.4", "3.11.3", "3.12.5"])?; - let toolchain = context.run(|| { - find_best_toolchain( - &ToolchainRequest::parse("3.11.11"), + let python = context.run(|| { + find_best_python_installation( + &PythonRequest::parse("3.11.11"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should find a toolchain; got {toolchain:?}" + "We should find a python; got {python:?}" ); assert_eq!( - &toolchain.interpreter().python_full_version().to_string(), + &python.interpreter().python_full_version().to_string(), "3.11.2", "We should fallback to the first matching minor" ); @@ -887,63 +892,63 @@ mod tests { } #[test] - fn find_best_toolchain_skips_source_without_match() -> Result<()> { + fn find_best_python_skips_source_without_match() -> Result<()> { let mut context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.12.0")?; context.add_python_versions(&["3.10.1"])?; - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_best_toolchain( - &ToolchainRequest::parse("3.10"), + find_best_python_installation( + &PythonRequest::parse("3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::SearchPath, + python, + PythonInstallation { + source: PythonSource::SearchPath, interpreter: _ } ), - "We should skip the active environment in favor of the requested version; got {toolchain:?}" + "We should skip the active environment in favor of the requested version; got {python:?}" ); Ok(()) } #[test] - fn find_best_toolchain_returns_to_earlier_source_on_fallback() -> Result<()> { + fn find_best_python_returns_to_earlier_source_on_fallback() -> Result<()> { let mut context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.10.1")?; context.add_python_versions(&["3.10.3"])?; - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_best_toolchain( - &ToolchainRequest::parse("3.10.2"), + find_best_python_installation( + &PythonRequest::parse("3.10.2"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert!( matches!( - toolchain, - Toolchain { - source: ToolchainSource::ActiveEnvironment, + python, + PythonInstallation { + source: PythonSource::ActiveEnvironment, interpreter: _ } ), - "We should prefer the active environment after relaxing; got {toolchain:?}" + "We should prefer the active environment after relaxing; got {python:?}" ); assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should prefer the active environment" ); @@ -952,22 +957,22 @@ mod tests { } #[test] - fn find_toolchain_from_active_toolchain() -> Result<()> { + fn find_python_from_active_python() -> Result<()> { let context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.12.0")?; - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", "We should prefer the active environment" ); @@ -976,115 +981,115 @@ mod tests { } #[test] - fn find_toolchain_from_conda_prefix() -> Result<()> { + fn find_python_from_conda_prefix() -> Result<()> { let context = TestContext::new()?; let condaenv = context.tempdir.child("condaenv"); TestContext::mock_conda_prefix(&condaenv, "3.12.0")?; - let toolchain = + let python = context.run_with_vars(&[("CONDA_PREFIX", Some(condaenv.as_os_str()))], || { - // Note this toolchain is not treated as a system interpreter - find_toolchain( - &ToolchainRequest::Any, + // Note this python is not treated as a system interpreter + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlyVirtual, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", - "We should allow the active conda toolchain" + "We should allow the active conda python" ); Ok(()) } #[test] - fn find_toolchain_from_conda_prefix_and_virtualenv() -> Result<()> { + fn find_python_from_conda_prefix_and_virtualenv() -> Result<()> { let context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.12.0")?; let condaenv = context.tempdir.child("condaenv"); TestContext::mock_conda_prefix(&condaenv, "3.12.1")?; - let toolchain = context.run_with_vars( + let python = context.run_with_vars( &[ ("VIRTUAL_ENV", Some(venv.as_os_str())), ("CONDA_PREFIX", Some(condaenv.as_os_str())), ], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", - "We should prefer the non-conda toolchain" + "We should prefer the non-conda python" ); // Put a virtual environment in the working directory let venv = context.workdir.child(".venv"); TestContext::mock_venv(venv, "3.12.2")?; - let toolchain = + let python = context.run_with_vars(&[("CONDA_PREFIX", Some(condaenv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.1", - "We should prefer the conda toolchain over inactive virtual environments" + "We should prefer the conda python over inactive virtual environments" ); Ok(()) } #[test] - fn find_toolchain_from_discovered_toolchain() -> Result<()> { + fn find_python_from_discovered_python() -> Result<()> { let mut context = TestContext::new()?; // Create a virtual environment in a parent of the workdir let venv = context.tempdir.child(".venv"); TestContext::mock_venv(venv, "3.12.0")?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", - "We should find the toolchain" + "We should find the python" ); // Add some system versions to ensure we don't use those context.add_python_versions(&["3.12.1", "3.12.2"])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", "We should prefer the discovered virtual environment over available system versions" ); @@ -1093,7 +1098,7 @@ mod tests { } #[test] - fn find_toolchain_skips_broken_active_toolchain() -> Result<()> { + fn find_python_skips_broken_active_python() -> Result<()> { let context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.12.0")?; @@ -1101,19 +1106,19 @@ mod tests { // Delete the pyvenv cfg to break the virtualenv fs_err::remove_file(venv.join("pyvenv.cfg"))?; - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", - // TODO(zanieb): We should skip this toolchain, why don't we? + // TODO(zanieb): We should skip this python, why don't we? "We should prefer the active environment" ); @@ -1121,7 +1126,7 @@ mod tests { } #[test] - fn find_toolchain_from_parent_interpreter() -> Result<()> { + fn find_python_from_parent_interpreter() -> Result<()> { let mut context = TestContext::new()?; let parent = context.tempdir.child("python").to_path_buf(); @@ -1133,19 +1138,19 @@ mod tests { true, )?; - let toolchain = context.run_with_vars( + let python = context.run_with_vars( &[("UV_INTERNAL__PARENT_INTERPRETER", Some(parent.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", "We should find the parent interpreter" ); @@ -1154,64 +1159,64 @@ mod tests { let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.12.2")?; context.add_python_versions(&["3.12.3"])?; - let toolchain = context.run_with_vars( + let python = context.run_with_vars( &[ ("UV_INTERNAL__PARENT_INTERPRETER", Some(parent.as_os_str())), ("VIRTUAL_ENV", Some(venv.as_os_str())), ], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", "We should prefer the parent interpreter" ); // Test with `EnvironmentPreference::ExplicitSystem` - let toolchain = context.run_with_vars( + let python = context.run_with_vars( &[ ("UV_INTERNAL__PARENT_INTERPRETER", Some(parent.as_os_str())), ("VIRTUAL_ENV", Some(venv.as_os_str())), ], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::ExplicitSystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.0", "We should prefer the parent interpreter" ); // Test with `EnvironmentPreference::OnlyVirtual` - let toolchain = context.run_with_vars( + let python = context.run_with_vars( &[ ("UV_INTERNAL__PARENT_INTERPRETER", Some(parent.as_os_str())), ("VIRTUAL_ENV", Some(venv.as_os_str())), ], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlyVirtual, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.2", "We find the virtual environment Python because a system is explicitly not allowed" ); @@ -1220,140 +1225,140 @@ mod tests { } #[test] - fn find_toolchain_active_toolchain_skipped_if_system_required() -> Result<()> { + fn find_python_active_python_skipped_if_system_required() -> Result<()> { let mut context = TestContext::new()?; let venv = context.tempdir.child(".venv"); TestContext::mock_venv(&venv, "3.9.0")?; context.add_python_versions(&["3.10.0", "3.11.1", "3.12.2"])?; // Without a specific request - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should skip the active environment" ); // With a requested minor version - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::parse("3.12"), + find_python_installation( + &PythonRequest::parse("3.12"), EnvironmentPreference::OnlySystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.12.2", "We should skip the active environment" ); - // With a patch version that cannot be toolchain + // With a patch version that cannot be python let result = context.run_with_vars(&[("VIRTUAL_ENV", Some(venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::parse("3.12.3"), + find_python_installation( + &PythonRequest::parse("3.12.3"), EnvironmentPreference::OnlySystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( result.is_err(), - "We should not find an toolchain; got {result:?}" + "We should not find an python; got {result:?}" ); Ok(()) } #[test] - fn find_toolchain_fails_if_no_virtualenv_and_system_not_allowed() -> Result<()> { + fn find_python_fails_if_no_virtualenv_and_system_not_allowed() -> Result<()> { let mut context = TestContext::new()?; context.add_python_versions(&["3.10.1", "3.11.2"])?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::OnlyVirtual, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), - "We should not find an toolchain; got {result:?}" + matches!(result, Err(PythonNotFound { .. })), + "We should not find an python; got {result:?}" ); // With an invalid virtual environment variable let result = context.run_with_vars( &[("VIRTUAL_ENV", Some(context.tempdir.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::parse("3.12.3"), + find_python_installation( + &PythonRequest::parse("3.12.3"), EnvironmentPreference::OnlySystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) }, )?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), - "We should not find an toolchain; got {result:?}" + matches!(result, Err(PythonNotFound { .. })), + "We should not find an python; got {result:?}" ); Ok(()) } #[test] - fn find_toolchain_allows_name_in_working_directory() -> Result<()> { + fn find_python_allows_name_in_working_directory() -> Result<()> { let context = TestContext::new()?; context.add_python_to_workdir("foobar", "3.10.0")?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("foobar"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("foobar"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the named executable" ); let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), + matches!(result, Err(PythonNotFound { .. })), "We should not find it without a specific request" ); let result = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("3.10.0"), + find_python_installation( + &PythonRequest::parse("3.10.0"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), + matches!(result, Err(PythonNotFound { .. })), "We should not find it via a matching version request" ); @@ -1361,7 +1366,7 @@ mod tests { } #[test] - fn find_toolchain_allows_relative_file_path() -> Result<()> { + fn find_python_allows_relative_file_path() -> Result<()> { let mut context = TestContext::new()?; let python = context.workdir.child("foo").join("bar"); TestContext::create_mock_interpreter( @@ -1371,31 +1376,31 @@ mod tests { true, )?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("./foo/bar"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("./foo/bar"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the `bar` executable" ); context.add_python_versions(&["3.11.1"])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("./foo/bar"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("./foo/bar"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should prefer the `bar` executable over the system and virtualenvs" ); @@ -1404,71 +1409,71 @@ mod tests { } #[test] - fn find_toolchain_allows_absolute_file_path() -> Result<()> { + fn find_python_allows_absolute_file_path() -> Result<()> { let mut context = TestContext::new()?; - let python = context.tempdir.child("foo").join("bar"); + let python_path = context.tempdir.child("foo").join("bar"); TestContext::create_mock_interpreter( - &python, + &python_path, &PythonVersion::from_str("3.10.0").unwrap(), ImplementationName::default(), true, )?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(python.to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(python_path.to_str().unwrap()), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the `bar` executable" ); // With `EnvironmentPreference::ExplicitSystem` - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(python.to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(python_path.to_str().unwrap()), EnvironmentPreference::ExplicitSystem, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should allow the `bar` executable with explicit system" ); // With `EnvironmentPreference::OnlyVirtual` - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(python.to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(python_path.to_str().unwrap()), EnvironmentPreference::OnlyVirtual, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should allow the `bar` executable and verify it is virtual" ); context.add_python_versions(&["3.11.1"])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(python.to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(python_path.to_str().unwrap()), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should prefer the `bar` executable over the system and virtualenvs" ); @@ -1477,57 +1482,57 @@ mod tests { } #[test] - fn find_toolchain_allows_venv_directory_path() -> Result<()> { + fn find_python_allows_venv_directory_path() -> Result<()> { let mut context = TestContext::new()?; let venv = context.tempdir.child("foo").child(".venv"); TestContext::mock_venv(&venv, "3.10.0")?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("../foo/.venv"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("../foo/.venv"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the relative venv path" ); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(venv.to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(venv.to_str().unwrap()), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the absolute venv path" ); // We should allow it to be a directory that _looks_ like a virtual environment. - let python = context.tempdir.child("bar").join("bin").join("python"); + let python_path = context.tempdir.child("bar").join("bin").join("python"); TestContext::create_mock_interpreter( - &python, + &python_path, &PythonVersion::from_str("3.10.0").unwrap(), ImplementationName::default(), true, )?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse(context.tempdir.child("bar").to_str().unwrap()), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse(context.tempdir.child("bar").to_str().unwrap()), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the executable in the directory" ); @@ -1535,17 +1540,17 @@ mod tests { let other_venv = context.tempdir.child("foobar").child(".venv"); TestContext::mock_venv(&other_venv, "3.11.1")?; context.add_python_versions(&["3.12.2"])?; - let toolchain = + let python = context.run_with_vars(&[("VIRTUAL_ENV", Some(other_venv.as_os_str()))], || { - find_toolchain( - &ToolchainRequest::parse(venv.to_str().unwrap()), + find_python_installation( + &PythonRequest::parse(venv.to_str().unwrap()), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should prefer the requested directory over the system and active virtual environments" ); @@ -1554,20 +1559,20 @@ mod tests { } #[test] - fn find_toolchain_treats_missing_file_path_as_file() -> Result<()> { + fn find_python_treats_missing_file_path_as_file() -> Result<()> { let context = TestContext::new()?; context.workdir.child("foo").create_dir_all()?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("./foo/bar"), + find_python_installation( + &PythonRequest::parse("./foo/bar"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), + matches!(result, Err(PythonNotFound { .. })), "We should not find the file; got {result:?}" ); @@ -1575,7 +1580,7 @@ mod tests { } #[test] - fn find_toolchain_executable_name_in_search_path() -> Result<()> { + fn find_python_executable_name_in_search_path() -> Result<()> { let mut context = TestContext::new()?; let python = context.tempdir.child("foo").join("bar"); TestContext::create_mock_interpreter( @@ -1586,16 +1591,16 @@ mod tests { )?; context.add_to_search_path(context.tempdir.child("foo").to_path_buf()); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("bar"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("bar"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should find the `bar` executable" ); @@ -1604,50 +1609,50 @@ mod tests { } #[test] - fn find_toolchain_pypy() -> Result<()> { + fn find_python_pypy() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[(true, ImplementationName::PyPy, "pypy", "3.10.0")])?; let result = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })?; assert!( - matches!(result, Err(ToolchainNotFound { .. })), + matches!(result, Err(PythonNotFound { .. })), "We should not the pypy interpreter if not named `python` or requested; got {result:?}" ); // But we should find it context.reset_search_path(); context.add_python_interpreters(&[(true, ImplementationName::PyPy, "python", "3.10.1")])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should find the pypy interpreter if it's the only one" ); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should find the pypy interpreter if it's requested" ); @@ -1656,37 +1661,37 @@ mod tests { } #[test] - fn find_toolchain_pypy_request_ignores_cpython() -> Result<()> { + fn find_python_pypy_request_ignores_cpython() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (true, ImplementationName::CPython, "python", "3.10.0"), (true, ImplementationName::PyPy, "pypy", "3.10.1"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should skip the CPython interpreter" ); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::Any, + let python = context.run(|| { + find_python_installation( + &PythonRequest::Any, EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should take the first interpreter without a specific request" ); @@ -1695,23 +1700,23 @@ mod tests { } #[test] - fn find_toolchain_pypy_request_skips_wrong_versions() -> Result<()> { + fn find_python_pypy_request_skips_wrong_versions() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (true, ImplementationName::PyPy, "pypy", "3.9"), (true, ImplementationName::PyPy, "pypy", "3.10.1"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should skip the first interpreter" ); @@ -1720,7 +1725,7 @@ mod tests { } #[test] - fn find_toolchain_pypy_finds_executable_with_version_name() -> Result<()> { + fn find_python_pypy_finds_executable_with_version_name() -> Result<()> { let mut context = TestContext::new()?; context.add_python_interpreters(&[ (true, ImplementationName::PyPy, "pypy3.9", "3.10.0"), // We don't consider this one because of the executable name @@ -1728,16 +1733,16 @@ mod tests { (true, ImplementationName::PyPy, "pypy", "3.10.2"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy@3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy@3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should find the requested interpreter version" ); @@ -1746,7 +1751,7 @@ mod tests { } #[test] - fn find_toolchain_pypy_prefers_executable_with_implementation_name() -> Result<()> { + fn find_python_pypy_prefers_executable_with_implementation_name() -> Result<()> { let mut context = TestContext::new()?; // We should prefer `pypy` executables over `python` executables in the same directory @@ -1765,16 +1770,16 @@ mod tests { )?; context.add_to_search_path(context.tempdir.to_path_buf()); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy@3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy@3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", ); @@ -1784,16 +1789,16 @@ mod tests { (true, ImplementationName::PyPy, "python", "3.10.2"), (true, ImplementationName::PyPy, "pypy", "3.10.3"), ])?; - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy@3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy@3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.2", ); @@ -1801,7 +1806,7 @@ mod tests { } #[test] - fn find_toolchain_pypy_prefers_executable_with_version() -> Result<()> { + fn find_python_pypy_prefers_executable_with_version() -> Result<()> { let mut context = TestContext::new()?; TestContext::create_mock_interpreter( &context.tempdir.join("pypy3.10"), @@ -1817,16 +1822,16 @@ mod tests { )?; context.add_to_search_path(context.tempdir.to_path_buf()); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy@3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy@3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.0", "We should prefer executables with the version number over those with implementation names" ); @@ -1846,16 +1851,16 @@ mod tests { )?; context.add_to_search_path(context.tempdir.to_path_buf()); - let toolchain = context.run(|| { - find_toolchain( - &ToolchainRequest::parse("pypy@3.10"), + let python = context.run(|| { + find_python_installation( + &PythonRequest::parse("pypy@3.10"), EnvironmentPreference::Any, - ToolchainPreference::OnlySystem, + PythonPreference::OnlySystem, &context.cache, ) })??; assert_eq!( - toolchain.interpreter().python_full_version().to_string(), + python.interpreter().python_full_version().to_string(), "3.10.1", "We should prefer an implementation name executable over a generic name with a version" ); diff --git a/crates/uv-toolchain/src/managed.rs b/crates/uv-python/src/managed.rs similarity index 64% rename from crates/uv-toolchain/src/managed.rs rename to crates/uv-python/src/managed.rs index 1e30e1391..d2d35fb04 100644 --- a/crates/uv-toolchain/src/managed.rs +++ b/crates/uv-python/src/managed.rs @@ -14,11 +14,11 @@ use crate::downloads::Error as DownloadError; use crate::implementation::{ Error as ImplementationError, ImplementationName, LenientImplementationName, }; +use crate::installation::{self, PythonInstallationKey}; use crate::platform::Error as PlatformError; use crate::platform::{Arch, Libc, Os}; use crate::python_version::PythonVersion; -use crate::toolchain::{self, ToolchainKey}; -use crate::ToolchainRequest; +use crate::PythonRequest; use uv_fs::{LockedFile, Simplified}; #[derive(Error, Debug)] @@ -41,26 +41,26 @@ pub enum Error { #[source] err: io::Error, }, - #[error("Failed to read toolchain directory: {0}", dir.user_display())] + #[error("Failed to read Python installation directory: {0}", dir.user_display())] ReadError { dir: PathBuf, #[source] err: io::Error, }, - #[error("Failed to read toolchain directory name: {0}")] + #[error("Failed to read managed Python directory name: {0}")] NameError(String), #[error(transparent)] - NameParseError(#[from] toolchain::ToolchainKeyError), + NameParseError(#[from] installation::PythonInstallationKeyError), } -/// A collection of uv-managed Python toolchains installed on the current system. +/// A collection of uv-managed Python installations installed on the current system. #[derive(Debug, Clone)] -pub struct InstalledToolchains { - /// The path to the top-level directory of the installed toolchains. +pub struct ManagedPythonInstallations { + /// The path to the top-level directory of the installed Python versions. root: PathBuf, } -impl InstalledToolchains { - /// A directory for installed toolchains at `root`. +impl ManagedPythonInstallations { + /// A directory for Python installations at `root`. fn from_path(root: impl Into) -> Self { Self { root: root.into() } } @@ -74,33 +74,48 @@ impl InstalledToolchains { } /// Prefer, in order: - /// 1. The specific toolchain directory specified by the user, i.e., `UV_TOOLCHAIN_DIR` - /// 2. A directory in the system-appropriate user-level data directory, e.g., `~/.local/uv/toolchains` - /// 3. A directory in the local data directory, e.g., `./.uv/toolchains` + /// 1. The specific Python directory specified by the user, i.e., `UV_PYTHON_INSTALL_DIR` + /// 2. A directory in the system-appropriate user-level data directory, e.g., `~/.local/uv/python` + /// 3. A directory in the local data directory, e.g., `./.uv/python` pub fn from_settings() -> Result { - if let Some(toolchain_dir) = std::env::var_os("UV_TOOLCHAIN_DIR") { - Ok(Self::from_path(toolchain_dir)) + if let Some(install_dir) = std::env::var_os("UV_PYTHON_INSTALL_DIR") { + Ok(Self::from_path(install_dir)) } else { Ok(Self::from_path( - StateStore::from_settings(None)?.bucket(StateBucket::Toolchains), + StateStore::from_settings(None)?.bucket(StateBucket::ManagedPython), )) } } - /// Create a temporary installed toolchain directory. + /// Create a temporary Python installation directory. pub fn temp() -> Result { Ok(Self::from_path( - StateStore::temp()?.bucket(StateBucket::Toolchains), + StateStore::temp()?.bucket(StateBucket::ManagedPython), )) } - /// Initialize the installed toolchain directory. + /// Initialize the Python installation directory. /// /// Ensures the directory is created. pub fn init(self) -> Result { let root = &self.root; - // Create the toolchain directory, if it doesn't exist. + // Support `toolchains` -> `python` migration transparently. + if !root.exists() + && root + .parent() + .is_some_and(|parent| parent.join("toolchains").exists()) + { + let deprecated = root.parent().unwrap().join("toolchains"); + // Move the deprecated directory to the new location. + fs::rename(&deprecated, root)?; + // Create a link or junction to at the old location + uv_fs::replace_symlink(root, &deprecated)?; + } else { + fs::create_dir_all(root)?; + } + + // Create the directory, if it doesn't exist. fs::create_dir_all(root)?; // Add a .gitignore. @@ -117,17 +132,19 @@ impl InstalledToolchains { Ok(self) } - /// Iterate over each installed toolchain in this directory. + /// Iterate over each Python installation in this directory. /// - /// Toolchains are sorted descending by name, such that we get deterministic + /// Pythons are sorted descending by name, such that we get deterministic /// ordering across platforms. This also results in newer Python versions coming first, - /// but should not be relied on — instead the toolchains should be sorted later by + /// but should not be relied on — instead the installations should be sorted later by /// the parsed Python version. - pub fn find_all(&self) -> Result, Error> { + pub fn find_all( + &self, + ) -> Result, Error> { let dirs = match fs_err::read_dir(&self.root) { - Ok(toolchain_dirs) => { + Ok(installation_dirs) => { // Collect sorted directory paths; `read_dir` is not stable across platforms - let directories: BTreeSet<_> = toolchain_dirs + let directories: BTreeSet<_> = installation_dirs .filter_map(|read_dir| match read_dir { Ok(entry) => match entry.file_type() { Ok(file_type) => file_type.is_dir().then_some(Ok(entry.path())), @@ -153,25 +170,25 @@ impl InstalledToolchains { Ok(dirs .into_iter() .filter_map(|path| { - InstalledToolchain::new(path) + ManagedPythonInstallation::new(path) .inspect_err(|err| { - warn!("Ignoring malformed toolchain entry:\n {err}"); + warn!("Ignoring malformed managed Python entry:\n {err}"); }) .ok() }) .rev()) } - /// Iterate over toolchains that support the current platform. + /// Iterate over Python installations that support the current platform. pub fn find_matching_current_platform( &self, - ) -> Result, Error> { + ) -> Result, Error> { let platform_key = platform_key_from_env(); - let iter = InstalledToolchains::from_settings()? + let iter = ManagedPythonInstallations::from_settings()? .find_all()? - .filter(move |toolchain| { - toolchain + .filter(move |installation| { + installation .path .file_name() .map(OsStr::to_string_lossy) @@ -181,20 +198,20 @@ impl InstalledToolchains { Ok(iter) } - /// Iterate over toolchains that satisfy the given Python version on this platform. + /// Iterate over managed Python installations that satisfy the requested version on this platform. /// /// ## Errors /// /// - The platform metadata cannot be read - /// - A directory in the toolchain directory cannot be read + /// - A directory for the installation cannot be read pub fn find_version<'a>( &self, version: &'a PythonVersion, - ) -> Result + 'a, Error> { + ) -> Result + 'a, Error> { Ok(self .find_matching_current_platform()? - .filter(move |toolchain| { - toolchain + .filter(move |installation| { + installation .path .file_name() .map(OsStr::to_string_lossy) @@ -208,21 +225,21 @@ impl InstalledToolchains { } static EXTERNALLY_MANAGED: &str = "[externally-managed] -Error=This toolchain is managed by uv and should not be modified. +Error=This Python installation is managed by uv and should not be modified. "; -/// A uv-managed Python toolchain installed on the current system.. +/// A uv-managed Python installation on the current system.. #[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)] -pub struct InstalledToolchain { - /// The path to the top-level directory of the installed toolchain. +pub struct ManagedPythonInstallation { + /// The path to the top-level directory of the installed Python. path: PathBuf, - /// An install key for the toolchain. - key: ToolchainKey, + /// An install key for the Python version. + key: PythonInstallationKey, } -impl InstalledToolchain { +impl ManagedPythonInstallation { pub fn new(path: PathBuf) -> Result { - let key = ToolchainKey::from_str( + let key = PythonInstallationKey::from_str( path.file_name() .ok_or(Error::NameError("name is empty".to_string()))? .to_str() @@ -252,7 +269,7 @@ impl InstalledToolchain { match self.key.implementation() { LenientImplementationName::Known(implementation) => implementation, LenientImplementationName::Unknown(_) => { - panic!("Managed toolchains should have a known implementation") + panic!("Managed Python installations should have a known implementation") } } } @@ -261,31 +278,31 @@ impl InstalledToolchain { &self.path } - pub fn key(&self) -> &ToolchainKey { + pub fn key(&self) -> &PythonInstallationKey { &self.key } - pub fn satisfies(&self, request: &ToolchainRequest) -> bool { + pub fn satisfies(&self, request: &PythonRequest) -> bool { match request { - ToolchainRequest::File(path) => self.executable() == *path, - ToolchainRequest::Any => true, - ToolchainRequest::Directory(path) => self.path() == *path, - ToolchainRequest::ExecutableName(name) => self + PythonRequest::File(path) => self.executable() == *path, + PythonRequest::Any => true, + PythonRequest::Directory(path) => self.path() == *path, + PythonRequest::ExecutableName(name) => self .executable() .file_name() .is_some_and(|filename| filename.to_string_lossy() == *name), - ToolchainRequest::Implementation(implementation) => { + PythonRequest::Implementation(implementation) => { implementation == self.implementation() } - ToolchainRequest::ImplementationVersion(implementation, version) => { + PythonRequest::ImplementationVersion(implementation, version) => { implementation == self.implementation() && version.matches_version(&self.version()) } - ToolchainRequest::Version(version) => version.matches_version(&self.version()), - ToolchainRequest::Key(request) => request.satisfied_by_key(self.key()), + PythonRequest::Version(version) => version.matches_version(&self.version()), + PythonRequest::Key(request) => request.satisfied_by_key(self.key()), } } - /// Ensure the toolchain is marked as externally managed with the + /// Ensure the environment is marked as externally managed with the /// standard `EXTERNALLY-MANAGED` file. pub fn ensure_externally_managed(&self) -> Result<(), Error> { // Construct the path to the `stdlib` directory. @@ -311,7 +328,7 @@ fn platform_key_from_env() -> String { format!("{os}-{arch}-{libc}").to_lowercase() } -impl fmt::Display for InstalledToolchain { +impl fmt::Display for ManagedPythonInstallation { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, diff --git a/crates/uv-toolchain/src/platform.rs b/crates/uv-python/src/platform.rs similarity index 100% rename from crates/uv-toolchain/src/platform.rs rename to crates/uv-python/src/platform.rs diff --git a/crates/uv-toolchain/src/pointer_size.rs b/crates/uv-python/src/pointer_size.rs similarity index 100% rename from crates/uv-toolchain/src/pointer_size.rs rename to crates/uv-python/src/pointer_size.rs diff --git a/crates/uv-toolchain/src/prefix.rs b/crates/uv-python/src/prefix.rs similarity index 100% rename from crates/uv-toolchain/src/prefix.rs rename to crates/uv-python/src/prefix.rs diff --git a/crates/uv-toolchain/src/py_launcher.rs b/crates/uv-python/src/py_launcher.rs similarity index 100% rename from crates/uv-toolchain/src/py_launcher.rs rename to crates/uv-python/src/py_launcher.rs diff --git a/crates/uv-toolchain/src/python_version.rs b/crates/uv-python/src/python_version.rs similarity index 100% rename from crates/uv-toolchain/src/python_version.rs rename to crates/uv-python/src/python_version.rs diff --git a/crates/uv-toolchain/src/target.rs b/crates/uv-python/src/target.rs similarity index 100% rename from crates/uv-toolchain/src/target.rs rename to crates/uv-python/src/target.rs diff --git a/crates/uv-toolchain/src/version_files.rs b/crates/uv-python/src/version_files.rs similarity index 74% rename from crates/uv-toolchain/src/version_files.rs rename to crates/uv-python/src/version_files.rs index c73fd93b0..0a245be18 100644 --- a/crates/uv-toolchain/src/version_files.rs +++ b/crates/uv-python/src/version_files.rs @@ -2,40 +2,40 @@ use fs_err as fs; use std::{io, path::PathBuf}; use tracing::debug; -use crate::ToolchainRequest; +use crate::PythonRequest; -/// Read [`ToolchainRequest`]s from a version file, if present. +/// Read [`PythonRequest`]s from a version file, if present. /// /// Prefers `.python-versions` then `.python-version`. /// If only one Python version is desired, use [`request_from_version_files`] which prefers the `.python-version` file. -pub async fn requests_from_version_file() -> Result>, io::Error> { +pub async fn requests_from_version_file() -> Result>, io::Error> { if let Some(versions) = read_versions_file().await? { Ok(Some( versions .into_iter() - .map(|version| ToolchainRequest::parse(&version)) + .map(|version| PythonRequest::parse(&version)) .collect(), )) } else if let Some(version) = read_version_file().await? { - Ok(Some(vec![ToolchainRequest::parse(&version)])) + Ok(Some(vec![PythonRequest::parse(&version)])) } else { Ok(None) } } -/// Read a [`ToolchainRequest`] from a version file, if present. +/// Read a [`PythonRequest`] from a version file, if present. /// /// Prefers `.python-version` then the first entry of `.python-versions`. /// If multiple Python versions are desired, use [`requests_from_version_files`] instead. -pub async fn request_from_version_file() -> Result, io::Error> { +pub async fn request_from_version_file() -> Result, io::Error> { if let Some(version) = read_version_file().await? { - Ok(Some(ToolchainRequest::parse(&version))) + Ok(Some(PythonRequest::parse(&version))) } else if let Some(versions) = read_versions_file().await? { Ok(versions .into_iter() .next() .inspect(|_| debug!("Using the first version from `.python-versions`")) - .map(|version| ToolchainRequest::parse(&version))) + .map(|version| PythonRequest::parse(&version))) } else { Ok(None) } diff --git a/crates/uv-toolchain/src/virtualenv.rs b/crates/uv-python/src/virtualenv.rs similarity index 100% rename from crates/uv-toolchain/src/virtualenv.rs rename to crates/uv-python/src/virtualenv.rs diff --git a/crates/uv-toolchain/template-download-metadata.py b/crates/uv-python/template-download-metadata.py similarity index 97% rename from crates/uv-toolchain/template-download-metadata.py rename to crates/uv-python/template-download-metadata.py index 9f8414d0e..c8e826f2a 100755 --- a/crates/uv-toolchain/template-download-metadata.py +++ b/crates/uv-python/template-download-metadata.py @@ -6,7 +6,7 @@ Generates the `downloads.inc` file from the `downloads.inc.mustache` template. Usage: - uv run --isolated --with chevron-blue -- crates/uv-toolchain/template-download-metadata.py + uv run --isolated --with chevron-blue -- crates/uv-python/template-download-metadata.py """ import sys diff --git a/crates/uv-resolver/Cargo.toml b/crates/uv-resolver/Cargo.toml index 8ce45cac2..99c191b0a 100644 --- a/crates/uv-resolver/Cargo.toml +++ b/crates/uv-resolver/Cargo.toml @@ -27,7 +27,7 @@ uv-client = { workspace = true } uv-configuration = { workspace = true } uv-distribution = { workspace = true } uv-git = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-normalize = { workspace = true } uv-types = { workspace = true } uv-warnings = { workspace = true } diff --git a/crates/uv-resolver/src/python_requirement.rs b/crates/uv-resolver/src/python_requirement.rs index cf06fdcdd..3a60d81ce 100644 --- a/crates/uv-resolver/src/python_requirement.rs +++ b/crates/uv-resolver/src/python_requirement.rs @@ -1,6 +1,6 @@ use pep440_rs::VersionSpecifiers; use pep508_rs::{MarkerTree, StringVersion}; -use uv_toolchain::{Interpreter, PythonVersion}; +use uv_python::{Interpreter, PythonVersion}; use crate::{RequiresPython, RequiresPythonBound}; diff --git a/crates/uv-settings/Cargo.toml b/crates/uv-settings/Cargo.toml index 8dbff5fc7..e9540a1d3 100644 --- a/crates/uv-settings/Cargo.toml +++ b/crates/uv-settings/Cargo.toml @@ -22,7 +22,7 @@ uv-fs = { workspace = true } uv-macros = { workspace = true } uv-normalize = { workspace = true, features = ["schemars"] } uv-resolver = { workspace = true, features = ["schemars"] } -uv-toolchain = { workspace = true, features = ["schemars"] } +uv-python = { workspace = true, features = ["schemars"] } uv-warnings = { workspace = true } dirs-sys = { workspace = true } diff --git a/crates/uv-settings/src/combine.rs b/crates/uv-settings/src/combine.rs index 0a74853eb..0b337ecce 100644 --- a/crates/uv-settings/src/combine.rs +++ b/crates/uv-settings/src/combine.rs @@ -4,8 +4,8 @@ use std::path::PathBuf; use distribution_types::IndexUrl; use install_wheel_rs::linker::LinkMode; use uv_configuration::{ConfigSettings, IndexStrategy, KeyringProviderType, TargetTriple}; +use uv_python::{PythonFetch, PythonPreference, PythonVersion}; use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode}; -use uv_toolchain::{PythonVersion, ToolchainFetch, ToolchainPreference}; use crate::{FilesystemOptions, PipOptions}; @@ -69,8 +69,8 @@ impl_combine_or!(PythonVersion); impl_combine_or!(ResolutionMode); impl_combine_or!(String); impl_combine_or!(TargetTriple); -impl_combine_or!(ToolchainPreference); -impl_combine_or!(ToolchainFetch); +impl_combine_or!(PythonPreference); +impl_combine_or!(PythonFetch); impl_combine_or!(bool); impl Combine for Option> { diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index 21f0a1f8f..ae1c2e13d 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -10,8 +10,8 @@ use uv_configuration::{ }; use uv_macros::CombineOptions; use uv_normalize::{ExtraName, PackageName}; +use uv_python::{PythonFetch, PythonPreference, PythonVersion}; use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode}; -use uv_toolchain::{PythonVersion, ToolchainFetch, ToolchainPreference}; /// A `pyproject.toml` with an (optional) `[tool.uv]` section. #[allow(dead_code)] @@ -59,8 +59,8 @@ pub struct GlobalOptions { pub no_cache: Option, pub cache_dir: Option, pub preview: Option, - pub toolchain_preference: Option, - pub toolchain_fetch: Option, + pub python_preference: Option, + pub python_fetch: Option, } /// Settings relevant to all installer operations. diff --git a/crates/uv-state/src/lib.rs b/crates/uv-state/src/lib.rs index 22f9bd0ed..d7a4f3dfe 100644 --- a/crates/uv-state/src/lib.rs +++ b/crates/uv-state/src/lib.rs @@ -95,8 +95,8 @@ impl StateStore { /// are subdirectories of the state store root. #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum StateBucket { - // Managed toolchains - Toolchains, + // Managed Python installations + ManagedPython, // Installed tools Tools, } @@ -104,7 +104,7 @@ pub enum StateBucket { impl StateBucket { fn to_str(self) -> &'static str { match self { - Self::Toolchains => "toolchains", + Self::ManagedPython => "python", Self::Tools => "tools", } } diff --git a/crates/uv-tool/Cargo.toml b/crates/uv-tool/Cargo.toml index 33426caba..26b276b89 100644 --- a/crates/uv-tool/Cargo.toml +++ b/crates/uv-tool/Cargo.toml @@ -20,7 +20,7 @@ pypi-types = { workspace = true } uv-cache = { workspace = true } uv-fs = { workspace = true } uv-state = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-virtualenv = { workspace = true } uv-warnings = { workspace = true } diff --git a/crates/uv-tool/src/lib.rs b/crates/uv-tool/src/lib.rs index 07cdd8728..b07c79d3e 100644 --- a/crates/uv-tool/src/lib.rs +++ b/crates/uv-tool/src/lib.rs @@ -14,8 +14,8 @@ pub use receipt::ToolReceipt; pub use tool::{Tool, ToolEntrypoint}; use uv_cache::Cache; use uv_fs::{LockedFile, Simplified}; +use uv_python::{Interpreter, PythonEnvironment}; use uv_state::{StateBucket, StateStore}; -use uv_toolchain::{Interpreter, PythonEnvironment}; use uv_warnings::warn_user_once; mod receipt; @@ -38,7 +38,7 @@ pub enum Error { #[error("Failed to find a directory for executables")] NoExecutableDirectory, #[error(transparent)] - EnvironmentError(#[from] uv_toolchain::Error), + EnvironmentError(#[from] uv_python::Error), #[error("Failed to find a receipt for tool `{0}` at {1}")] MissingToolReceipt(String, PathBuf), } diff --git a/crates/uv-types/Cargo.toml b/crates/uv-types/Cargo.toml index 06d2bf4a0..3ffaeedc6 100644 --- a/crates/uv-types/Cargo.toml +++ b/crates/uv-types/Cargo.toml @@ -21,7 +21,7 @@ pypi-types = { workspace = true } uv-cache = { workspace = true } uv-configuration = { workspace = true } uv-git = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-normalize = { workspace = true } anyhow = { workspace = true } diff --git a/crates/uv-types/src/builds.rs b/crates/uv-types/src/builds.rs index c3b1261cf..c6ee29ec8 100644 --- a/crates/uv-types/src/builds.rs +++ b/crates/uv-types/src/builds.rs @@ -1,4 +1,4 @@ -use uv_toolchain::PythonEnvironment; +use uv_python::PythonEnvironment; /// Whether to enforce build isolation when building source distributions. #[derive(Debug, Default, Copy, Clone)] diff --git a/crates/uv-types/src/traits.rs b/crates/uv-types/src/traits.rs index 91a86e19f..bac9cb05c 100644 --- a/crates/uv-types/src/traits.rs +++ b/crates/uv-types/src/traits.rs @@ -9,7 +9,7 @@ use pypi_types::Requirement; use uv_cache::Cache; use uv_configuration::{BuildKind, BuildOptions}; use uv_git::GitResolver; -use uv_toolchain::{Interpreter, PythonEnvironment}; +use uv_python::{Interpreter, PythonEnvironment}; /// Avoids cyclic crate dependencies between resolver, installer and builder. /// diff --git a/crates/uv-virtualenv/Cargo.toml b/crates/uv-virtualenv/Cargo.toml index 0724d045d..7b8e2a969 100644 --- a/crates/uv-virtualenv/Cargo.toml +++ b/crates/uv-virtualenv/Cargo.toml @@ -20,7 +20,7 @@ workspace = true platform-tags = { workspace = true } pypi-types = { workspace = true } uv-fs = { workspace = true } -uv-toolchain = { workspace = true } +uv-python = { workspace = true } uv-version = { workspace = true } fs-err = { workspace = true } diff --git a/crates/uv-virtualenv/src/bare.rs b/crates/uv-virtualenv/src/bare.rs index 0d4e84746..8094833bd 100644 --- a/crates/uv-virtualenv/src/bare.rs +++ b/crates/uv-virtualenv/src/bare.rs @@ -13,7 +13,7 @@ use tracing::info; use pypi_types::Scheme; use uv_fs::{cachedir, Simplified}; -use uv_toolchain::{Interpreter, VirtualEnvironment}; +use uv_python::{Interpreter, VirtualEnvironment}; use uv_version::version; use crate::{Error, Prompt}; diff --git a/crates/uv-virtualenv/src/lib.rs b/crates/uv-virtualenv/src/lib.rs index 31a02f3a5..95729fe80 100644 --- a/crates/uv-virtualenv/src/lib.rs +++ b/crates/uv-virtualenv/src/lib.rs @@ -4,7 +4,7 @@ use std::path::Path; use thiserror::Error; use platform_tags::PlatformError; -use uv_toolchain::{Interpreter, PythonEnvironment}; +use uv_python::{Interpreter, PythonEnvironment}; pub use crate::bare::create_bare_venv; @@ -15,9 +15,9 @@ pub enum Error { #[error(transparent)] IO(#[from] io::Error), #[error("Failed to determine Python interpreter to use")] - Discovery(#[from] uv_toolchain::DiscoveryError), + Discovery(#[from] uv_python::DiscoveryError), #[error("Failed to determine Python interpreter to use")] - InterpreterNotFound(#[from] uv_toolchain::ToolchainNotFound), + InterpreterNotFound(#[from] uv_python::PythonNotFound), #[error(transparent)] Platform(#[from] PlatformError), #[error("Could not find a suitable Python executable for the virtual environment based on the interpreter: {0}")] diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 78fa0bb7c..fb4821a1e 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -36,7 +36,7 @@ uv-resolver = { workspace = true } uv-scripts = { workspace = true } uv-settings = { workspace = true, features = ["schemars"] } uv-tool = { workspace = true } -uv-toolchain = { workspace = true, features = ["schemars"]} +uv-python = { workspace = true, features = ["schemars"]} uv-types = { workspace = true } uv-virtualenv = { workspace = true } uv-warnings = { workspace = true } diff --git a/crates/uv/src/commands/mod.rs b/crates/uv/src/commands/mod.rs index 6a5b2f5ab..c7154862f 100644 --- a/crates/uv/src/commands/mod.rs +++ b/crates/uv/src/commands/mod.rs @@ -22,6 +22,11 @@ pub(crate) use project::lock::lock; pub(crate) use project::remove::remove; pub(crate) use project::run::run; pub(crate) use project::sync::sync; +pub(crate) use python::dir::dir as python_dir; +pub(crate) use python::find::find as python_find; +pub(crate) use python::install::install as python_install; +pub(crate) use python::list::list as python_list; +pub(crate) use python::uninstall::uninstall as python_uninstall; #[cfg(feature = "self-update")] pub(crate) use self_update::self_update; pub(crate) use tool::dir::dir as tool_dir; @@ -29,16 +34,11 @@ pub(crate) use tool::install::install as tool_install; pub(crate) use tool::list::list as tool_list; pub(crate) use tool::run::run as tool_run; pub(crate) use tool::uninstall::uninstall as tool_uninstall; -pub(crate) use toolchain::dir::dir as toolchain_dir; -pub(crate) use toolchain::find::find as toolchain_find; -pub(crate) use toolchain::install::install as toolchain_install; -pub(crate) use toolchain::list::list as toolchain_list; -pub(crate) use toolchain::uninstall::uninstall as toolchain_uninstall; use uv_cache::Cache; use uv_fs::Simplified; use uv_installer::compile_tree; use uv_normalize::PackageName; -use uv_toolchain::PythonEnvironment; +use uv_python::PythonEnvironment; pub(crate) use venv::venv; pub(crate) use version::version; @@ -49,9 +49,9 @@ mod cache_dir; mod cache_prune; pub(crate) mod pip; mod project; +mod python; pub(crate) mod reporters; mod tool; -mod toolchain; #[cfg(feature = "self-update")] mod self_update; diff --git a/crates/uv/src/commands/pip/check.rs b/crates/uv/src/commands/pip/check.rs index 4fc7f84a0..f4fd23567 100644 --- a/crates/uv/src/commands/pip/check.rs +++ b/crates/uv/src/commands/pip/check.rs @@ -10,7 +10,7 @@ use uv_cache::Cache; use uv_configuration::PreviewMode; use uv_fs::Simplified; use uv_installer::{SitePackages, SitePackagesDiagnostic}; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment, ToolchainRequest}; +use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; use crate::commands::{elapsed, ExitStatus}; use crate::printer::Printer; @@ -27,7 +27,7 @@ pub(crate) fn pip_check( // Detect the current Python interpreter. let environment = PythonEnvironment::find( - &python.map(ToolchainRequest::parse).unwrap_or_default(), + &python.map(PythonRequest::parse).unwrap_or_default(), EnvironmentPreference::from_system_flag(system, false), cache, )?; diff --git a/crates/uv/src/commands/pip/compile.rs b/crates/uv/src/commands/pip/compile.rs index fbb4557ab..7439e69c1 100644 --- a/crates/uv/src/commands/pip/compile.rs +++ b/crates/uv/src/commands/pip/compile.rs @@ -23,6 +23,10 @@ use uv_dispatch::BuildDispatch; use uv_fs::Simplified; use uv_git::GitResolver; use uv_normalize::PackageName; +use uv_python::{ + EnvironmentPreference, PythonEnvironment, PythonInstallation, PythonPreference, PythonRequest, + PythonVersion, VersionRequest, +}; use uv_requirements::{ upgrade::read_requirements_txt, RequirementsSource, RequirementsSpecification, }; @@ -31,10 +35,6 @@ use uv_resolver::{ InMemoryIndex, OptionsBuilder, PreReleaseMode, PythonRequirement, RequiresPython, ResolutionMode, }; -use uv_toolchain::{ - EnvironmentPreference, PythonEnvironment, PythonVersion, Toolchain, ToolchainPreference, - ToolchainRequest, VersionRequest, -}; use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight}; use uv_warnings::warn_user; @@ -83,7 +83,7 @@ pub(crate) async fn pip_compile( link_mode: LinkMode, python: Option, system: bool, - toolchain_preference: ToolchainPreference, + python_preference: PythonPreference, concurrency: Concurrency, native_tls: bool, quiet: bool, @@ -159,18 +159,18 @@ pub(crate) async fn pip_compile( // Find an interpreter to use for building distributions let environments = EnvironmentPreference::from_system_flag(system, false); let interpreter = if let Some(python) = python.as_ref() { - let request = ToolchainRequest::parse(python); - Toolchain::find(&request, environments, toolchain_preference, &cache) + let request = PythonRequest::parse(python); + PythonInstallation::find(&request, environments, python_preference, &cache) } else { // TODO(zanieb): The split here hints at a problem with the abstraction; we should be able to use - // `Toolchain::find(...)` here. + // `PythonInstallation::find(...)` here. let request = if let Some(version) = python_version.as_ref() { // TODO(zanieb): We should consolidate `VersionRequest` and `PythonVersion` - ToolchainRequest::Version(VersionRequest::from(version)) + PythonRequest::Version(VersionRequest::from(version)) } else { - ToolchainRequest::default() + PythonRequest::default() }; - Toolchain::find_best(&request, environments, toolchain_preference, &cache) + PythonInstallation::find_best(&request, environments, python_preference, &cache) }? .into_interpreter(); diff --git a/crates/uv/src/commands/pip/freeze.rs b/crates/uv/src/commands/pip/freeze.rs index e4fcd3ed4..875a3848e 100644 --- a/crates/uv/src/commands/pip/freeze.rs +++ b/crates/uv/src/commands/pip/freeze.rs @@ -10,7 +10,7 @@ use uv_cache::Cache; use uv_configuration::PreviewMode; use uv_fs::Simplified; use uv_installer::SitePackages; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment, ToolchainRequest}; +use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; use crate::commands::ExitStatus; use crate::printer::Printer; @@ -27,7 +27,7 @@ pub(crate) fn pip_freeze( ) -> Result { // Detect the current Python interpreter. let environment = PythonEnvironment::find( - &python.map(ToolchainRequest::parse).unwrap_or_default(), + &python.map(PythonRequest::parse).unwrap_or_default(), EnvironmentPreference::from_system_flag(system, false), cache, )?; diff --git a/crates/uv/src/commands/pip/install.rs b/crates/uv/src/commands/pip/install.rs index 7d69677f9..f2c1e749a 100644 --- a/crates/uv/src/commands/pip/install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -20,14 +20,14 @@ use uv_dispatch::BuildDispatch; use uv_fs::Simplified; use uv_git::GitResolver; use uv_installer::{SatisfiesResult, SitePackages}; +use uv_python::{ + EnvironmentPreference, Prefix, PythonEnvironment, PythonRequest, PythonVersion, Target, +}; use uv_requirements::{RequirementsSource, RequirementsSpecification}; use uv_resolver::{ DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode, PythonRequirement, ResolutionMode, }; -use uv_toolchain::{ - EnvironmentPreference, Prefix, PythonEnvironment, PythonVersion, Target, ToolchainRequest, -}; use uv_types::{BuildIsolation, HashStrategy, InFlight}; use crate::commands::pip::operations::Modifications; @@ -119,7 +119,7 @@ pub(crate) async fn pip_install( let environment = PythonEnvironment::find( &python .as_deref() - .map(ToolchainRequest::parse) + .map(PythonRequest::parse) .unwrap_or_default(), EnvironmentPreference::from_system_flag(system, true), &cache, diff --git a/crates/uv/src/commands/pip/list.rs b/crates/uv/src/commands/pip/list.rs index d5b670644..6de581302 100644 --- a/crates/uv/src/commands/pip/list.rs +++ b/crates/uv/src/commands/pip/list.rs @@ -15,8 +15,8 @@ use uv_configuration::PreviewMode; use uv_fs::Simplified; use uv_installer::SitePackages; use uv_normalize::PackageName; -use uv_toolchain::ToolchainRequest; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment}; +use uv_python::PythonRequest; +use uv_python::{EnvironmentPreference, PythonEnvironment}; use crate::commands::ExitStatus; use crate::printer::Printer; @@ -37,7 +37,7 @@ pub(crate) fn pip_list( ) -> Result { // Detect the current Python interpreter. let environment = PythonEnvironment::find( - &python.map(ToolchainRequest::parse).unwrap_or_default(), + &python.map(PythonRequest::parse).unwrap_or_default(), EnvironmentPreference::from_system_flag(system, false), cache, )?; diff --git a/crates/uv/src/commands/pip/mod.rs b/crates/uv/src/commands/pip/mod.rs index 394473bb6..5730efb72 100644 --- a/crates/uv/src/commands/pip/mod.rs +++ b/crates/uv/src/commands/pip/mod.rs @@ -3,7 +3,7 @@ use std::borrow::Cow; use pep508_rs::MarkerEnvironment; use platform_tags::{Tags, TagsError}; use uv_configuration::TargetTriple; -use uv_toolchain::{Interpreter, PythonVersion}; +use uv_python::{Interpreter, PythonVersion}; pub(crate) mod check; pub(crate) mod compile; diff --git a/crates/uv/src/commands/pip/operations.rs b/crates/uv/src/commands/pip/operations.rs index ecfe3d16e..d83738b59 100644 --- a/crates/uv/src/commands/pip/operations.rs +++ b/crates/uv/src/commands/pip/operations.rs @@ -29,6 +29,7 @@ use uv_distribution::DistributionDatabase; use uv_fs::Simplified; use uv_installer::{Plan, Planner, Preparer, SitePackages}; use uv_normalize::{GroupName, PackageName}; +use uv_python::PythonEnvironment; use uv_requirements::{ LookaheadResolver, NamedRequirementsResolver, RequirementsSource, RequirementsSpecification, SourceTreeResolver, @@ -37,7 +38,6 @@ use uv_resolver::{ DependencyMode, Exclusions, FlatIndex, InMemoryIndex, Manifest, Options, Preference, Preferences, PythonRequirement, ResolutionGraph, Resolver, }; -use uv_toolchain::PythonEnvironment; use uv_types::{HashStrategy, InFlight, InstalledPackagesProvider}; use uv_warnings::warn_user; diff --git a/crates/uv/src/commands/pip/show.rs b/crates/uv/src/commands/pip/show.rs index 992c918b6..fe979cbf0 100644 --- a/crates/uv/src/commands/pip/show.rs +++ b/crates/uv/src/commands/pip/show.rs @@ -12,7 +12,7 @@ use uv_configuration::PreviewMode; use uv_fs::Simplified; use uv_installer::SitePackages; use uv_normalize::PackageName; -use uv_toolchain::{EnvironmentPreference, PythonEnvironment, ToolchainRequest}; +use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest}; use crate::commands::ExitStatus; use crate::printer::Printer; @@ -42,7 +42,7 @@ pub(crate) fn pip_show( // Detect the current Python interpreter. let environment = PythonEnvironment::find( - &python.map(ToolchainRequest::parse).unwrap_or_default(), + &python.map(PythonRequest::parse).unwrap_or_default(), EnvironmentPreference::from_system_flag(system, false), cache, )?; diff --git a/crates/uv/src/commands/pip/sync.rs b/crates/uv/src/commands/pip/sync.rs index db07d57c0..232f83e7b 100644 --- a/crates/uv/src/commands/pip/sync.rs +++ b/crates/uv/src/commands/pip/sync.rs @@ -19,14 +19,14 @@ use uv_dispatch::BuildDispatch; use uv_fs::Simplified; use uv_git::GitResolver; use uv_installer::SitePackages; +use uv_python::{ + EnvironmentPreference, Prefix, PythonEnvironment, PythonRequest, PythonVersion, Target, +}; use uv_requirements::{RequirementsSource, RequirementsSpecification}; use uv_resolver::{ DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode, PythonRequirement, ResolutionMode, }; -use uv_toolchain::{ - EnvironmentPreference, Prefix, PythonEnvironment, PythonVersion, Target, ToolchainRequest, -}; use uv_types::{BuildIsolation, HashStrategy, InFlight}; use crate::commands::pip::operations::Modifications; @@ -117,7 +117,7 @@ pub(crate) async fn pip_sync( let environment = PythonEnvironment::find( &python .as_deref() - .map(ToolchainRequest::parse) + .map(PythonRequest::parse) .unwrap_or_default(), EnvironmentPreference::from_system_flag(system, true), &cache, diff --git a/crates/uv/src/commands/pip/tree.rs b/crates/uv/src/commands/pip/tree.rs index 888fa7e7f..95ac77921 100644 --- a/crates/uv/src/commands/pip/tree.rs +++ b/crates/uv/src/commands/pip/tree.rs @@ -13,9 +13,9 @@ use uv_cache::Cache; use uv_fs::Simplified; use uv_installer::SitePackages; use uv_normalize::PackageName; -use uv_toolchain::EnvironmentPreference; -use uv_toolchain::PythonEnvironment; -use uv_toolchain::ToolchainRequest; +use uv_python::EnvironmentPreference; +use uv_python::PythonEnvironment; +use uv_python::PythonRequest; use crate::commands::ExitStatus; use crate::printer::Printer; @@ -36,7 +36,7 @@ pub(crate) fn pip_tree( ) -> Result { // Detect the current Python interpreter. let environment = PythonEnvironment::find( - &python.map(ToolchainRequest::parse).unwrap_or_default(), + &python.map(PythonRequest::parse).unwrap_or_default(), EnvironmentPreference::from_system_flag(system, false), cache, )?; diff --git a/crates/uv/src/commands/pip/uninstall.rs b/crates/uv/src/commands/pip/uninstall.rs index 27219ccb0..d8863b5c5 100644 --- a/crates/uv/src/commands/pip/uninstall.rs +++ b/crates/uv/src/commands/pip/uninstall.rs @@ -13,10 +13,10 @@ use uv_cache::Cache; use uv_client::{BaseClientBuilder, Connectivity}; use uv_configuration::{KeyringProviderType, PreviewMode}; use uv_fs::Simplified; +use uv_python::EnvironmentPreference; +use uv_python::PythonRequest; +use uv_python::{Prefix, PythonEnvironment, Target}; use uv_requirements::{RequirementsSource, RequirementsSpecification}; -use uv_toolchain::EnvironmentPreference; -use uv_toolchain::ToolchainRequest; -use uv_toolchain::{Prefix, PythonEnvironment, Target}; use crate::commands::{elapsed, ExitStatus}; use crate::printer::Printer; @@ -49,7 +49,7 @@ pub(crate) async fn pip_uninstall( let environment = PythonEnvironment::find( &python .as_deref() - .map(ToolchainRequest::parse) + .map(PythonRequest::parse) .unwrap_or_default(), EnvironmentPreference::from_system_flag(system, true), &cache, diff --git a/crates/uv/src/commands/project/add.rs b/crates/uv/src/commands/project/add.rs index 4b4f59fc8..f410cff95 100644 --- a/crates/uv/src/commands/project/add.rs +++ b/crates/uv/src/commands/project/add.rs @@ -10,9 +10,9 @@ use uv_distribution::pyproject_mut::PyProjectTomlMut; use uv_distribution::{DistributionDatabase, ProjectWorkspace, VirtualProject, Workspace}; use uv_git::GitResolver; use uv_normalize::PackageName; +use uv_python::{PythonFetch, PythonPreference, PythonRequest}; use uv_requirements::{NamedRequirementsResolver, RequirementsSource, RequirementsSpecification}; use uv_resolver::{FlatIndex, InMemoryIndex}; -use uv_toolchain::{ToolchainFetch, ToolchainPreference, ToolchainRequest}; use uv_types::{BuildIsolation, HashStrategy, InFlight}; use uv_warnings::warn_user_once; @@ -38,8 +38,8 @@ pub(crate) async fn add( package: Option, python: Option, settings: ResolverInstallerSettings, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, preview: PreviewMode, connectivity: Connectivity, concurrency: Concurrency, @@ -64,9 +64,9 @@ pub(crate) async fn add( // Discover or create the virtual environment. let venv = project::get_or_init_environment( project.workspace(), - python.as_deref().map(ToolchainRequest::parse), - toolchain_preference, - toolchain_fetch, + python.as_deref().map(PythonRequest::parse), + python_preference, + python_fetch, connectivity, native_tls, cache, diff --git a/crates/uv/src/commands/project/lock.rs b/crates/uv/src/commands/project/lock.rs index 0bed2c04b..c6718d2b2 100644 --- a/crates/uv/src/commands/project/lock.rs +++ b/crates/uv/src/commands/project/lock.rs @@ -7,9 +7,9 @@ use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode, Reinstall, use uv_dispatch::BuildDispatch; use uv_distribution::{Workspace, DEV_DEPENDENCIES}; use uv_git::ResolvedRepositoryReference; +use uv_python::{Interpreter, PythonFetch, PythonPreference, PythonRequest}; use uv_requirements::upgrade::{read_lockfile, LockedRequirements}; use uv_resolver::{FlatIndex, Lock, OptionsBuilder, PythonRequirement, RequiresPython}; -use uv_toolchain::{Interpreter, ToolchainFetch, ToolchainPreference, ToolchainRequest}; use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight}; use uv_warnings::{warn_user, warn_user_once}; @@ -23,8 +23,8 @@ pub(crate) async fn lock( python: Option, settings: ResolverSettings, preview: PreviewMode, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, concurrency: Concurrency, native_tls: bool, @@ -41,9 +41,9 @@ pub(crate) async fn lock( // Find an interpreter for the project let interpreter = FoundInterpreter::discover( &workspace, - python.as_deref().map(ToolchainRequest::parse), - toolchain_preference, - toolchain_fetch, + python.as_deref().map(PythonRequest::parse), + python_preference, + python_fetch, connectivity, native_tls, cache, diff --git a/crates/uv/src/commands/project/mod.rs b/crates/uv/src/commands/project/mod.rs index c2a382446..1d1ae805d 100644 --- a/crates/uv/src/commands/project/mod.rs +++ b/crates/uv/src/commands/project/mod.rs @@ -15,12 +15,12 @@ use uv_distribution::{DistributionDatabase, Workspace}; use uv_fs::Simplified; use uv_git::GitResolver; use uv_installer::{SatisfiesResult, SitePackages}; +use uv_python::{ + request_from_version_file, EnvironmentPreference, Interpreter, PythonEnvironment, PythonFetch, + PythonInstallation, PythonPreference, PythonRequest, VersionRequest, +}; use uv_requirements::{NamedRequirementsResolver, RequirementsSpecification}; use uv_resolver::{FlatIndex, InMemoryIndex, OptionsBuilder, PythonRequirement, RequiresPython}; -use uv_toolchain::{ - request_from_version_file, EnvironmentPreference, Interpreter, PythonEnvironment, Toolchain, - ToolchainFetch, ToolchainPreference, ToolchainRequest, VersionRequest, -}; use uv_types::{BuildIsolation, HashStrategy, InFlight}; use crate::commands::pip; @@ -44,7 +44,7 @@ pub(crate) enum ProjectError { RequestedPythonIncompatibility(Version, RequiresPython), #[error(transparent)] - Toolchain(#[from] uv_toolchain::Error), + Python(#[from] uv_python::Error), #[error(transparent)] Virtualenv(#[from] uv_virtualenv::Error), @@ -94,14 +94,14 @@ pub(crate) fn find_requires_python( fn find_environment( workspace: &Workspace, cache: &Cache, -) -> Result { +) -> Result { PythonEnvironment::from_root(workspace.venv(), cache) } /// Check if the given interpreter satisfies the project's requirements. fn interpreter_meets_requirements( interpreter: &Interpreter, - requested_python: Option<&ToolchainRequest>, + requested_python: Option<&PythonRequest>, cache: &Cache, ) -> bool { let Some(request) = requested_python else { @@ -126,9 +126,9 @@ impl FoundInterpreter { /// Discover the interpreter to use in the current [`Workspace`]. pub(crate) async fn discover( workspace: &Workspace, - python_request: Option, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_request: Option, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, native_tls: bool, cache: &Cache, @@ -147,9 +147,7 @@ impl FoundInterpreter { requires_python .as_ref() .map(RequiresPython::specifiers) - .map(|specifiers| { - ToolchainRequest::Version(VersionRequest::Range(specifiers.clone())) - }) + .map(|specifiers| PythonRequest::Version(VersionRequest::Range(specifiers.clone()))) }; // Read from the virtual environment first. @@ -172,7 +170,7 @@ impl FoundInterpreter { } } } - Err(uv_toolchain::Error::MissingEnvironment(_)) => {} + Err(uv_python::Error::MissingEnvironment(_)) => {} Err(err) => return Err(err.into()), }; @@ -181,11 +179,11 @@ impl FoundInterpreter { .native_tls(native_tls); // Locate the Python interpreter to use in the environment - let interpreter = Toolchain::find_or_fetch( + let interpreter = PythonInstallation::find_or_fetch( python_request, EnvironmentPreference::OnlySystem, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) @@ -223,9 +221,9 @@ impl FoundInterpreter { /// Initialize a virtual environment for the current project. pub(crate) async fn get_or_init_environment( workspace: &Workspace, - python: Option, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python: Option, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, native_tls: bool, cache: &Cache, @@ -234,8 +232,8 @@ pub(crate) async fn get_or_init_environment( match FoundInterpreter::discover( workspace, python, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, connectivity, native_tls, cache, diff --git a/crates/uv/src/commands/project/remove.rs b/crates/uv/src/commands/project/remove.rs index 5b13757ca..5730223ac 100644 --- a/crates/uv/src/commands/project/remove.rs +++ b/crates/uv/src/commands/project/remove.rs @@ -7,7 +7,7 @@ use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode}; use uv_distribution::pyproject::DependencyType; use uv_distribution::pyproject_mut::PyProjectTomlMut; use uv_distribution::{ProjectWorkspace, VirtualProject, Workspace}; -use uv_toolchain::{ToolchainFetch, ToolchainPreference, ToolchainRequest}; +use uv_python::{PythonFetch, PythonPreference, PythonRequest}; use uv_warnings::{warn_user, warn_user_once}; use crate::commands::pip::operations::Modifications; @@ -22,8 +22,8 @@ pub(crate) async fn remove( dependency_type: DependencyType, package: Option, python: Option, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, preview: PreviewMode, connectivity: Connectivity, concurrency: Concurrency, @@ -85,9 +85,9 @@ pub(crate) async fn remove( // Discover or create the virtual environment. let venv = project::get_or_init_environment( project.workspace(), - python.as_deref().map(ToolchainRequest::parse), - toolchain_preference, - toolchain_fetch, + python.as_deref().map(PythonRequest::parse), + python_preference, + python_fetch, connectivity, native_tls, cache, diff --git a/crates/uv/src/commands/project/run.rs b/crates/uv/src/commands/project/run.rs index 8e05bbd69..4a3cc123f 100644 --- a/crates/uv/src/commands/project/run.rs +++ b/crates/uv/src/commands/project/run.rs @@ -13,11 +13,11 @@ use uv_client::{BaseClientBuilder, Connectivity}; use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode}; use uv_distribution::{VirtualProject, Workspace, WorkspaceError}; use uv_normalize::PackageName; -use uv_requirements::{RequirementsSource, RequirementsSpecification}; -use uv_toolchain::{ - request_from_version_file, EnvironmentPreference, Interpreter, PythonEnvironment, Toolchain, - ToolchainFetch, ToolchainPreference, ToolchainRequest, VersionRequest, +use uv_python::{ + request_from_version_file, EnvironmentPreference, Interpreter, PythonEnvironment, PythonFetch, + PythonInstallation, PythonPreference, PythonRequest, VersionRequest, }; +use uv_requirements::{RequirementsSource, RequirementsSpecification}; use uv_warnings::warn_user_once; use crate::commands::pip::operations::Modifications; @@ -37,8 +37,8 @@ pub(crate) async fn run( settings: ResolverInstallerSettings, isolated: bool, preview: PreviewMode, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, concurrency: Concurrency, native_tls: bool, @@ -71,14 +71,14 @@ pub(crate) async fn run( // (1) Explicit request from user let python_request = if let Some(request) = python.as_deref() { - Some(ToolchainRequest::parse(request)) + Some(PythonRequest::parse(request)) // (2) Request from `.python-version` } else if let Some(request) = request_from_version_file().await? { Some(request) // (3) `Requires-Python` in `pyproject.toml` } else { metadata.requires_python.map(|requires_python| { - ToolchainRequest::Version(VersionRequest::Range(requires_python)) + PythonRequest::Version(VersionRequest::Range(requires_python)) }) }; @@ -86,11 +86,11 @@ pub(crate) async fn run( .connectivity(connectivity) .native_tls(native_tls); - let interpreter = Toolchain::find_or_fetch( + let interpreter = PythonInstallation::find_or_fetch( python_request, EnvironmentPreference::Any, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) @@ -171,9 +171,9 @@ pub(crate) async fn run( let venv = project::get_or_init_environment( project.workspace(), - python.as_deref().map(ToolchainRequest::parse), - toolchain_preference, - toolchain_fetch, + python.as_deref().map(PythonRequest::parse), + python_preference, + python_fetch, connectivity, native_tls, cache, @@ -221,18 +221,18 @@ pub(crate) async fn run( .connectivity(connectivity) .native_tls(native_tls); - let toolchain = Toolchain::find_or_fetch( - python.as_deref().map(ToolchainRequest::parse), + let python = PythonInstallation::find_or_fetch( + python.as_deref().map(PythonRequest::parse), // No opt-in is required for system environments, since we are not mutating it. EnvironmentPreference::Any, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) .await?; - toolchain.into_interpreter() + python.into_interpreter() }; Some(interpreter) @@ -262,11 +262,11 @@ pub(crate) async fn run( .native_tls(native_tls); // Note we force preview on during `uv run` for now since the entire interface is in preview - Toolchain::find_or_fetch( - python.as_deref().map(ToolchainRequest::parse), + PythonInstallation::find_or_fetch( + python.as_deref().map(PythonRequest::parse), EnvironmentPreference::Any, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) diff --git a/crates/uv/src/commands/project/sync.rs b/crates/uv/src/commands/project/sync.rs index 6751c8094..42a352e44 100644 --- a/crates/uv/src/commands/project/sync.rs +++ b/crates/uv/src/commands/project/sync.rs @@ -6,8 +6,8 @@ use uv_configuration::{Concurrency, ExtrasSpecification, PreviewMode, SetupPyStr use uv_dispatch::BuildDispatch; use uv_distribution::{VirtualProject, DEV_DEPENDENCIES}; use uv_installer::SitePackages; +use uv_python::{PythonEnvironment, PythonFetch, PythonPreference, PythonRequest}; use uv_resolver::{FlatIndex, Lock}; -use uv_toolchain::{PythonEnvironment, ToolchainFetch, ToolchainPreference, ToolchainRequest}; use uv_types::{BuildIsolation, HashStrategy, InFlight}; use uv_warnings::warn_user_once; @@ -23,8 +23,8 @@ pub(crate) async fn sync( dev: bool, modifications: Modifications, python: Option, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, settings: InstallerSettings, preview: PreviewMode, connectivity: Connectivity, @@ -43,9 +43,9 @@ pub(crate) async fn sync( // Discover or create the virtual environment. let venv = project::get_or_init_environment( project.workspace(), - python.as_deref().map(ToolchainRequest::parse), - toolchain_preference, - toolchain_fetch, + python.as_deref().map(PythonRequest::parse), + python_preference, + python_fetch, connectivity, native_tls, cache, diff --git a/crates/uv/src/commands/toolchain/dir.rs b/crates/uv/src/commands/python/dir.rs similarity index 58% rename from crates/uv/src/commands/toolchain/dir.rs rename to crates/uv/src/commands/python/dir.rs index c716896a4..5fe3f3fc8 100644 --- a/crates/uv/src/commands/toolchain/dir.rs +++ b/crates/uv/src/commands/python/dir.rs @@ -2,16 +2,16 @@ use anyhow::Context; use owo_colors::OwoColorize; use uv_configuration::PreviewMode; use uv_fs::Simplified; -use uv_toolchain::managed::InstalledToolchains; +use uv_python::managed::ManagedPythonInstallations; use uv_warnings::warn_user_once; /// Show the toolchain directory. pub(crate) fn dir(preview: PreviewMode) -> anyhow::Result<()> { if preview.is_disabled() { - warn_user_once!("`uv toolchain dir` is experimental and may change without warning."); + warn_user_once!("`uv python dir` is experimental and may change without warning."); } - let installed_toolchains = - InstalledToolchains::from_settings().context("Failed to initialize toolchain settings")?; + let installed_toolchains = ManagedPythonInstallations::from_settings() + .context("Failed to initialize toolchain settings")?; anstream::println!( "{}", installed_toolchains.root().simplified_display().cyan() diff --git a/crates/uv/src/commands/toolchain/find.rs b/crates/uv/src/commands/python/find.rs similarity index 56% rename from crates/uv/src/commands/toolchain/find.rs rename to crates/uv/src/commands/python/find.rs index 8f9d6ecaa..5a35d7150 100644 --- a/crates/uv/src/commands/toolchain/find.rs +++ b/crates/uv/src/commands/python/find.rs @@ -4,39 +4,39 @@ use std::fmt::Write; use uv_cache::Cache; use uv_configuration::PreviewMode; use uv_fs::Simplified; -use uv_toolchain::{EnvironmentPreference, Toolchain, ToolchainPreference, ToolchainRequest}; +use uv_python::{EnvironmentPreference, PythonInstallation, PythonPreference, PythonRequest}; use uv_warnings::warn_user_once; use crate::commands::ExitStatus; use crate::printer::Printer; -/// Find a toolchain. +/// Find a Python interpreter. pub(crate) async fn find( request: Option, - toolchain_preference: ToolchainPreference, + python_preference: PythonPreference, preview: PreviewMode, cache: &Cache, printer: Printer, ) -> Result { if preview.is_disabled() { - warn_user_once!("`uv toolchain find` is experimental and may change without warning."); + warn_user_once!("`uv python find` is experimental and may change without warning."); } let request = match request { - Some(request) => ToolchainRequest::parse(&request), - None => ToolchainRequest::Any, + Some(request) => PythonRequest::parse(&request), + None => PythonRequest::Any, }; - let toolchain = Toolchain::find( + let python = PythonInstallation::find( &request, EnvironmentPreference::OnlySystem, - toolchain_preference, + python_preference, cache, )?; writeln!( printer.stdout(), "{}", - toolchain.interpreter().sys_executable().user_display() + python.interpreter().sys_executable().user_display() )?; Ok(ExitStatus::Success) diff --git a/crates/uv/src/commands/toolchain/install.rs b/crates/uv/src/commands/python/install.rs similarity index 64% rename from crates/uv/src/commands/toolchain/install.rs rename to crates/uv/src/commands/python/install.rs index 369ce60ec..9d463f510 100644 --- a/crates/uv/src/commands/toolchain/install.rs +++ b/crates/uv/src/commands/python/install.rs @@ -5,15 +5,15 @@ use uv_cache::Cache; use uv_client::Connectivity; use uv_configuration::PreviewMode; use uv_fs::Simplified; -use uv_toolchain::downloads::{self, DownloadResult, PythonDownload, PythonDownloadRequest}; -use uv_toolchain::managed::{InstalledToolchain, InstalledToolchains}; -use uv_toolchain::{requests_from_version_file, ToolchainRequest}; +use uv_python::downloads::{self, DownloadResult, ManagedPythonDownload, PythonDownloadRequest}; +use uv_python::managed::{ManagedPythonInstallation, ManagedPythonInstallations}; +use uv_python::{requests_from_version_file, PythonRequest}; use uv_warnings::warn_user_once; use crate::commands::ExitStatus; use crate::printer::Printer; -/// Download and install a Python toolchain. +/// Download and install Python versions. pub(crate) async fn install( targets: Vec, force: bool, @@ -24,25 +24,25 @@ pub(crate) async fn install( printer: Printer, ) -> Result { if preview.is_disabled() { - warn_user_once!("`uv toolchain install` is experimental and may change without warning."); + warn_user_once!("`uv python install` is experimental and may change without warning."); } let start = std::time::Instant::now(); - let toolchains = InstalledToolchains::from_settings()?.init()?; - let toolchain_dir = toolchains.root(); - let _lock = toolchains.acquire_lock()?; + let installations = ManagedPythonInstallations::from_settings()?.init()?; + let installations_dir = installations.root(); + let _lock = installations.acquire_lock()?; let requests: Vec<_> = if targets.is_empty() { if let Some(requests) = requests_from_version_file().await? { requests } else { - vec![ToolchainRequest::Any] + vec![PythonRequest::Any] } } else { targets .iter() - .map(|target| ToolchainRequest::parse(target.as_str())) + .map(|target| PythonRequest::parse(target.as_str())) .collect() }; @@ -51,21 +51,21 @@ pub(crate) async fn install( .map(PythonDownloadRequest::from_request) .collect::, downloads::Error>>()?; - let installed_toolchains: Vec<_> = toolchains.find_all()?.collect(); + let installed_installations: Vec<_> = installations.find_all()?.collect(); let mut unfilled_requests = Vec::new(); for (request, download_request) in requests.iter().zip(download_requests) { writeln!( printer.stderr(), - "Looking for toolchain {request} ({download_request})" + "Looking for installation {request} ({download_request})" )?; - if let Some(toolchain) = installed_toolchains + if let Some(installation) = installed_installations .iter() - .find(|toolchain| download_request.satisfied_by_key(toolchain.key())) + .find(|installation| download_request.satisfied_by_key(installation.key())) { writeln!( printer.stderr(), - "Found installed toolchain `{}` that satisfies {request}", - toolchain.key() + "Found installed installation `{}` that satisfies {request}", + installation.key() )?; if force { unfilled_requests.push(download_request); @@ -76,18 +76,21 @@ pub(crate) async fn install( } if unfilled_requests.is_empty() { - if matches!(requests.as_slice(), [ToolchainRequest::Any]) { + if matches!(requests.as_slice(), [PythonRequest::Any]) { writeln!( printer.stderr(), - "A toolchain is already installed. Use `uv toolchain install ` to install a specific toolchain.", + "A installation is already installed. Use `uv installation install ` to install a specific installation.", )?; } else if requests.len() > 1 { writeln!( printer.stderr(), - "All requested toolchains already installed." + "All requested installations already installed." )?; } else { - writeln!(printer.stderr(), "Requested toolchain already installed.")?; + writeln!( + printer.stderr(), + "Requested installation already installed." + )?; } return Ok(ExitStatus::Success); } @@ -95,7 +98,7 @@ pub(crate) async fn install( if unfilled_requests.len() > 1 { writeln!( printer.stderr(), - "Found {}/{} toolchains requiring installation", + "Found {}/{} installations requiring installation", unfilled_requests.len(), requests.len() )?; @@ -105,8 +108,8 @@ pub(crate) async fn install( .into_iter() // Populate the download requests with defaults .map(PythonDownloadRequest::fill) - .map(|request| PythonDownload::from_request(&request)) - .collect::, uv_toolchain::downloads::Error>>()?; + .map(|request| ManagedPythonDownload::from_request(&request)) + .collect::, uv_python::downloads::Error>>()?; // Construct a client let client = uv_client::BaseClientBuilder::new() @@ -117,7 +120,7 @@ pub(crate) async fn install( let mut tasks = futures::stream::iter(downloads.iter()) .map(|download| async { let _ = writeln!(printer.stderr(), "Downloading {}", download.key()); - let result = download.fetch(&client, toolchain_dir).await; + let result = download.fetch(&client, installations_dir).await; (download.python_version(), result) }) .buffered(4); @@ -138,7 +141,7 @@ pub(crate) async fn install( } }; // Ensure the installations have externally managed markers - let installed = InstalledToolchain::new(path.clone())?; + let installed = ManagedPythonInstallation::new(path.clone())?; installed.ensure_externally_managed()?; results.push((version, path)); } @@ -146,7 +149,7 @@ pub(crate) async fn install( let s = if downloads.len() == 1 { "" } else { "s" }; writeln!( printer.stderr(), - "Installed {} toolchain{s} in {}s", + "Installed {} installation{s} in {}s", downloads.len(), start.elapsed().as_secs() )?; diff --git a/crates/uv/src/commands/toolchain/list.rs b/crates/uv/src/commands/python/list.rs similarity index 70% rename from crates/uv/src/commands/toolchain/list.rs rename to crates/uv/src/commands/python/list.rs index 926d31b8c..b8fb9ae4c 100644 --- a/crates/uv/src/commands/toolchain/list.rs +++ b/crates/uv/src/commands/python/list.rs @@ -6,16 +6,16 @@ use anyhow::Result; use uv_cache::Cache; use uv_configuration::PreviewMode; use uv_fs::Simplified; -use uv_toolchain::downloads::PythonDownloadRequest; -use uv_toolchain::{ - find_toolchains, DiscoveryError, EnvironmentPreference, Toolchain, ToolchainFetch, - ToolchainNotFound, ToolchainPreference, ToolchainRequest, ToolchainSource, +use uv_python::downloads::PythonDownloadRequest; +use uv_python::{ + find_python_installations, DiscoveryError, EnvironmentPreference, PythonFetch, + PythonInstallation, PythonNotFound, PythonPreference, PythonRequest, PythonSource, }; use uv_warnings::warn_user_once; use crate::commands::ExitStatus; use crate::printer::Printer; -use crate::settings::ToolchainListKinds; +use crate::settings::PythonListKinds; #[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Ord)] enum Kind { @@ -24,26 +24,26 @@ enum Kind { System, } -/// List available toolchains. +/// List available Python installations. #[allow(clippy::too_many_arguments)] pub(crate) async fn list( - kinds: ToolchainListKinds, + kinds: PythonListKinds, all_versions: bool, all_platforms: bool, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, preview: PreviewMode, cache: &Cache, printer: Printer, ) -> Result { if preview.is_disabled() { - warn_user_once!("`uv toolchain list` is experimental and may change without warning."); + warn_user_once!("`uv python list` is experimental and may change without warning."); } let download_request = match kinds { - ToolchainListKinds::Installed => None, - ToolchainListKinds::Default => { - if toolchain_fetch.is_automatic() { + PythonListKinds::Installed => None, + PythonListKinds::Default => { + if python_fetch.is_automatic() { Some(if all_platforms { PythonDownloadRequest::default() } else { @@ -58,14 +58,14 @@ pub(crate) async fn list( let downloads = download_request .as_ref() - .map(uv_toolchain::downloads::PythonDownloadRequest::iter_downloads) + .map(uv_python::downloads::PythonDownloadRequest::iter_downloads) .into_iter() .flatten(); - let installed = find_toolchains( - &ToolchainRequest::Any, + let installed = find_python_installations( + &PythonRequest::Any, EnvironmentPreference::OnlySystem, - toolchain_preference, + python_preference, cache, ) // Raise discovery errors if critical @@ -75,24 +75,24 @@ pub(crate) async fn list( .err() .map_or(true, DiscoveryError::is_critical) }) - .collect::>, DiscoveryError>>()? + .collect::>, DiscoveryError>>()? .into_iter() - // Drop any "missing" toolchains + // Drop any "missing" installations .filter_map(std::result::Result::ok); let mut output = BTreeSet::new(); - for toolchain in installed { - let kind = if matches!(toolchain.source(), ToolchainSource::Managed) { + for installation in installed { + let kind = if matches!(installation.source(), PythonSource::Managed) { Kind::Managed } else { Kind::System }; output.insert(( - toolchain.python_version().clone(), - toolchain.os().to_string(), - toolchain.key().clone(), + installation.python_version().clone(), + installation.os().to_string(), + installation.key().clone(), kind, - Some(toolchain.interpreter().sys_executable().to_path_buf()), + Some(installation.interpreter().sys_executable().to_path_buf()), )); } for download in downloads { diff --git a/crates/uv/src/commands/toolchain/mod.rs b/crates/uv/src/commands/python/mod.rs similarity index 100% rename from crates/uv/src/commands/toolchain/mod.rs rename to crates/uv/src/commands/python/mod.rs diff --git a/crates/uv/src/commands/python/uninstall.rs b/crates/uv/src/commands/python/uninstall.rs new file mode 100644 index 000000000..6c36a444b --- /dev/null +++ b/crates/uv/src/commands/python/uninstall.rs @@ -0,0 +1,124 @@ +use anyhow::Result; +use futures::StreamExt; +use itertools::Itertools; +use std::collections::BTreeSet; +use std::fmt::Write; +use uv_configuration::PreviewMode; +use uv_python::downloads::{self, PythonDownloadRequest}; +use uv_python::managed::ManagedPythonInstallations; +use uv_python::PythonRequest; +use uv_warnings::warn_user_once; + +use crate::commands::ExitStatus; +use crate::printer::Printer; + +/// Uninstall managed Python versions. +pub(crate) async fn uninstall( + targets: Vec, + preview: PreviewMode, + printer: Printer, +) -> Result { + if preview.is_disabled() { + warn_user_once!("`uv python uninstall` is experimental and may change without warning."); + } + + let installations = ManagedPythonInstallations::from_settings()?.init()?; + let _lock = installations.acquire_lock()?; + + let requests = targets + .iter() + .map(|target| PythonRequest::parse(target.as_str())) + .collect::>(); + + let download_requests = requests + .iter() + .map(PythonDownloadRequest::from_request) + .collect::, downloads::Error>>()?; + + let installed_installations: Vec<_> = installations.find_all()?.collect(); + let mut matching_installations = BTreeSet::default(); + for (request, download_request) in requests.iter().zip(download_requests) { + writeln!( + printer.stderr(), + "Looking for Python installations matching {request} ({download_request})" + )?; + let mut found = false; + for installation in installed_installations + .iter() + .filter(|installation| download_request.satisfied_by_key(installation.key())) + { + found = true; + if matching_installations.insert(installation.clone()) { + writeln!( + printer.stderr(), + "Found installation `{}` that matches {request}", + installation.key() + )?; + } + } + if !found { + writeln!( + printer.stderr(), + "No installations found matching {request}" + )?; + } + } + + if matching_installations.is_empty() { + if matches!(requests.as_slice(), [PythonRequest::Any]) { + writeln!(printer.stderr(), "No installed installations found")?; + } else if requests.len() > 1 { + writeln!( + printer.stderr(), + "No installations found matching the requests" + )?; + } else { + writeln!( + printer.stderr(), + "No installations found matching the request" + )?; + } + return Ok(ExitStatus::Failure); + } + + let tasks = futures::stream::iter(matching_installations.iter()) + .map(|installation| async { + ( + installation.key(), + fs_err::tokio::remove_dir_all(installation.path()).await, + ) + }) + .buffered(4); + + let results = tasks.collect::>().await; + let mut failed = false; + for (key, result) in results.iter().sorted_by_key(|(key, _)| key) { + if let Err(err) = result { + failed = true; + writeln!(printer.stderr(), "Failed to uninstall `{key}`: {err}")?; + } else { + writeln!(printer.stderr(), "Uninstalled `{key}`")?; + } + } + + if failed { + if matching_installations.len() > 1 { + writeln!(printer.stderr(), "Some Python uninstalls failed")?; + } + return Ok(ExitStatus::Failure); + } + + let s = if matching_installations.len() == 1 { + "" + } else { + "s" + }; + + writeln!( + printer.stderr(), + "Removed {} Python installation{s}", + matching_installations.len() + )?; + + Ok(ExitStatus::Success) +} diff --git a/crates/uv/src/commands/tool/install.rs b/crates/uv/src/commands/tool/install.rs index 0ef5b4486..3ee848a16 100644 --- a/crates/uv/src/commands/tool/install.rs +++ b/crates/uv/src/commands/tool/install.rs @@ -17,12 +17,12 @@ use uv_fs::replace_symlink; use uv_fs::Simplified; use uv_installer::SitePackages; use uv_normalize::PackageName; +use uv_python::{ + EnvironmentPreference, Interpreter, PythonFetch, PythonInstallation, PythonPreference, + PythonRequest, +}; use uv_requirements::RequirementsSpecification; use uv_tool::{entrypoint_paths, find_executable_directory, InstalledTools, Tool, ToolEntrypoint}; -use uv_toolchain::{ - EnvironmentPreference, Interpreter, Toolchain, ToolchainFetch, ToolchainPreference, - ToolchainRequest, -}; use uv_warnings::warn_user_once; use crate::commands::pip::operations::Modifications; @@ -40,8 +40,8 @@ pub(crate) async fn install( force: bool, settings: ResolverInstallerSettings, preview: PreviewMode, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, concurrency: Concurrency, native_tls: bool, @@ -56,15 +56,15 @@ pub(crate) async fn install( .connectivity(connectivity) .native_tls(native_tls); - let python_request = python.as_deref().map(ToolchainRequest::parse); + let python_request = python.as_deref().map(PythonRequest::parse); // Pre-emptively identify a Python interpreter. We need an interpreter to resolve any unnamed // requirements, even if we end up using a different interpreter for the tool install itself. - let interpreter = Toolchain::find_or_fetch( + let interpreter = PythonInstallation::find_or_fetch( python_request.clone(), EnvironmentPreference::OnlySystem, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) diff --git a/crates/uv/src/commands/tool/run.rs b/crates/uv/src/commands/tool/run.rs index cdf45141e..70f678067 100644 --- a/crates/uv/src/commands/tool/run.rs +++ b/crates/uv/src/commands/tool/run.rs @@ -14,11 +14,11 @@ use uv_cli::ExternalCommand; use uv_client::{BaseClientBuilder, Connectivity}; use uv_configuration::{Concurrency, PreviewMode}; use uv_normalize::PackageName; -use uv_requirements::{RequirementsSource, RequirementsSpecification}; -use uv_toolchain::{ - EnvironmentPreference, PythonEnvironment, Toolchain, ToolchainFetch, ToolchainPreference, - ToolchainRequest, +use uv_python::{ + EnvironmentPreference, PythonEnvironment, PythonFetch, PythonInstallation, PythonPreference, + PythonRequest, }; +use uv_requirements::{RequirementsSource, RequirementsSpecification}; use uv_warnings::warn_user_once; use crate::commands::pip::operations::Modifications; @@ -36,8 +36,8 @@ pub(crate) async fn run( settings: ResolverInstallerSettings, _isolated: bool, preview: PreviewMode, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, connectivity: Connectivity, concurrency: Concurrency, native_tls: bool, @@ -78,11 +78,11 @@ pub(crate) async fn run( debug!("Syncing ephemeral environment."); // Discover an interpreter. - let interpreter = Toolchain::find_or_fetch( - python.as_deref().map(ToolchainRequest::parse), + let interpreter = PythonInstallation::find_or_fetch( + python.as_deref().map(PythonRequest::parse), EnvironmentPreference::OnlySystem, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) diff --git a/crates/uv/src/commands/toolchain/uninstall.rs b/crates/uv/src/commands/toolchain/uninstall.rs deleted file mode 100644 index 0cdb3f2a3..000000000 --- a/crates/uv/src/commands/toolchain/uninstall.rs +++ /dev/null @@ -1,121 +0,0 @@ -use anyhow::Result; -use futures::StreamExt; -use itertools::Itertools; -use std::collections::BTreeSet; -use std::fmt::Write; -use uv_configuration::PreviewMode; -use uv_toolchain::downloads::{self, PythonDownloadRequest}; -use uv_toolchain::managed::InstalledToolchains; -use uv_toolchain::ToolchainRequest; -use uv_warnings::warn_user_once; - -use crate::commands::ExitStatus; -use crate::printer::Printer; - -/// Uninstall Python toolchains. -pub(crate) async fn uninstall( - targets: Vec, - preview: PreviewMode, - printer: Printer, -) -> Result { - if preview.is_disabled() { - warn_user_once!("`uv toolchain uninstall` is experimental and may change without warning."); - } - - let toolchains = InstalledToolchains::from_settings()?.init()?; - let _lock = toolchains.acquire_lock()?; - - let requests = targets - .iter() - .map(|target| ToolchainRequest::parse(target.as_str())) - .collect::>(); - - let download_requests = requests - .iter() - .map(PythonDownloadRequest::from_request) - .collect::, downloads::Error>>()?; - - let installed_toolchains: Vec<_> = toolchains.find_all()?.collect(); - let mut matching_toolchains = BTreeSet::default(); - for (request, download_request) in requests.iter().zip(download_requests) { - writeln!( - printer.stderr(), - "Looking for installed toolchains matching {request} ({download_request})" - )?; - let mut found = false; - for toolchain in installed_toolchains - .iter() - .filter(|toolchain| download_request.satisfied_by_key(toolchain.key())) - { - found = true; - if matching_toolchains.insert(toolchain.clone()) { - writeln!( - printer.stderr(), - "Found toolchain `{}` that matches {request}", - toolchain.key() - )?; - } - } - if !found { - writeln!(printer.stderr(), "No toolchains found matching {request}")?; - } - } - - if matching_toolchains.is_empty() { - if matches!(requests.as_slice(), [ToolchainRequest::Any]) { - writeln!(printer.stderr(), "No installed toolchains found")?; - } else if requests.len() > 1 { - writeln!( - printer.stderr(), - "No toolchains found matching the requests" - )?; - } else { - writeln!(printer.stderr(), "No toolchains found matching the request")?; - } - return Ok(ExitStatus::Failure); - } - - let tasks = futures::stream::iter(matching_toolchains.iter()) - .map(|toolchain| async { - ( - toolchain.key(), - fs_err::tokio::remove_dir_all(toolchain.path()).await, - ) - }) - .buffered(4); - - let results = tasks.collect::>().await; - let mut failed = false; - for (key, result) in results.iter().sorted_by_key(|(key, _)| key) { - if let Err(err) = result { - failed = true; - writeln!( - printer.stderr(), - "Failed to uninstall toolchain `{key}`: {err}" - )?; - } else { - writeln!(printer.stderr(), "Uninstalled toolchain `{key}`")?; - } - } - - if failed { - if matching_toolchains.len() > 1 { - writeln!(printer.stderr(), "Uninstall of some toolchains failed")?; - } - return Ok(ExitStatus::Failure); - } - - let s = if matching_toolchains.len() == 1 { - "" - } else { - "s" - }; - - writeln!( - printer.stderr(), - "Uninstalled {} toolchain{s}", - matching_toolchains.len() - )?; - - Ok(ExitStatus::Success) -} diff --git a/crates/uv/src/commands/venv.rs b/crates/uv/src/commands/venv.rs index f9835291d..ee32d2da8 100644 --- a/crates/uv/src/commands/venv.rs +++ b/crates/uv/src/commands/venv.rs @@ -22,11 +22,11 @@ use uv_configuration::{ use uv_dispatch::BuildDispatch; use uv_fs::Simplified; use uv_git::GitResolver; -use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex}; -use uv_toolchain::{ - request_from_version_file, EnvironmentPreference, Toolchain, ToolchainFetch, - ToolchainPreference, ToolchainRequest, +use uv_python::{ + request_from_version_file, EnvironmentPreference, PythonFetch, PythonInstallation, + PythonPreference, PythonRequest, }; +use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex}; use uv_types::{BuildContext, BuildIsolation, HashStrategy, InFlight}; use crate::commands::{pip, ExitStatus}; @@ -42,8 +42,8 @@ use crate::shell::Shell; pub(crate) async fn venv( path: &Path, python_request: Option<&str>, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, link_mode: LinkMode, index_locations: &IndexLocations, index_strategy: IndexStrategy, @@ -71,8 +71,8 @@ pub(crate) async fn venv( connectivity, seed, preview, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, allow_existing, exclude_newer, native_tls, @@ -122,8 +122,8 @@ async fn venv_impl( connectivity: Connectivity, seed: bool, preview: PreviewMode, - toolchain_preference: ToolchainPreference, - toolchain_fetch: ToolchainFetch, + python_preference: PythonPreference, + python_fetch: PythonFetch, allow_existing: bool, exclude_newer: Option, native_tls: bool, @@ -134,17 +134,17 @@ async fn venv_impl( .connectivity(connectivity) .native_tls(native_tls); - let mut interpreter_request = python_request.map(ToolchainRequest::parse); + let mut interpreter_request = python_request.map(PythonRequest::parse); if preview.is_enabled() && interpreter_request.is_none() { interpreter_request = request_from_version_file().await.into_diagnostic()?; } // Locate the Python interpreter to use in the environment - let interpreter = Toolchain::find_or_fetch( + let interpreter = PythonInstallation::find_or_fetch( interpreter_request, EnvironmentPreference::OnlySystem, - toolchain_preference, - toolchain_fetch, + python_preference, + python_fetch, &client_builder, cache, ) diff --git a/crates/uv/src/main.rs b/crates/uv/src/main.rs index d1df2f234..ee5362fb0 100644 --- a/crates/uv/src/main.rs +++ b/crates/uv/src/main.rs @@ -17,9 +17,9 @@ use uv_cli::{ compat::CompatArgs, CacheCommand, CacheNamespace, Cli, Commands, PipCommand, PipNamespace, ProjectCommand, }; +use uv_cli::{PythonCommand, PythonNamespace, ToolCommand, ToolNamespace}; #[cfg(feature = "self-update")] use uv_cli::{SelfCommand, SelfNamespace}; -use uv_cli::{ToolCommand, ToolNamespace, ToolchainCommand, ToolchainNamespace}; use uv_configuration::Concurrency; use uv_distribution::Workspace; use uv_requirements::RequirementsSource; @@ -288,7 +288,7 @@ async fn run() -> Result { args.settings.link_mode, args.settings.python, args.settings.system, - globals.toolchain_preference, + globals.python_preference, args.settings.concurrency, globals.native_tls, globals.quiet, @@ -617,8 +617,8 @@ async fn run() -> Result { commands::venv( &args.name, args.settings.python.as_deref(), - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, args.settings.link_mode, &args.settings.index_locations, args.settings.index_strategy, @@ -660,8 +660,8 @@ async fn run() -> Result { args.settings, globals.isolated, globals.preview, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.connectivity, Concurrency::default(), globals.native_tls, @@ -683,8 +683,8 @@ async fn run() -> Result { args.dev, args.modifications, args.python, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, args.settings, globals.preview, globals.connectivity, @@ -707,8 +707,8 @@ async fn run() -> Result { args.python, args.settings, globals.preview, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.connectivity, Concurrency::default(), globals.native_tls, @@ -737,8 +737,8 @@ async fn run() -> Result { args.package, args.python, args.settings, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.preview, globals.connectivity, Concurrency::default(), @@ -761,8 +761,8 @@ async fn run() -> Result { args.dependency_type, args.package, args.python, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.preview, globals.connectivity, Concurrency::default(), @@ -802,8 +802,8 @@ async fn run() -> Result { args.settings, globals.isolated, globals.preview, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.connectivity, Concurrency::default(), globals.native_tls, @@ -830,8 +830,8 @@ async fn run() -> Result { args.force, args.settings, globals.preview, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.connectivity, Concurrency::default(), globals.native_tls, @@ -864,39 +864,39 @@ async fn run() -> Result { commands::tool_dir(globals.preview)?; Ok(ExitStatus::Success) } - Commands::Toolchain(ToolchainNamespace { - command: ToolchainCommand::List(args), + Commands::Python(PythonNamespace { + command: PythonCommand::List(args), }) => { // Resolve the settings from the command-line arguments and workspace configuration. - let args = settings::ToolchainListSettings::resolve(args, filesystem); + let args = settings::PythonListSettings::resolve(args, filesystem); show_settings!(args); // Initialize the cache. let cache = cache.init()?; - commands::toolchain_list( + commands::python_list( args.kinds, args.all_versions, args.all_platforms, - globals.toolchain_preference, - globals.toolchain_fetch, + globals.python_preference, + globals.python_fetch, globals.preview, &cache, printer, ) .await } - Commands::Toolchain(ToolchainNamespace { - command: ToolchainCommand::Install(args), + Commands::Python(PythonNamespace { + command: PythonCommand::Install(args), }) => { // Resolve the settings from the command-line arguments and workspace configuration. - let args = settings::ToolchainInstallSettings::resolve(args, filesystem); + let args = settings::PythonInstallSettings::resolve(args, filesystem); show_settings!(args); // Initialize the cache. let cache = cache.init()?; - commands::toolchain_install( + commands::python_install( args.targets, args.force, globals.native_tls, @@ -907,37 +907,37 @@ async fn run() -> Result { ) .await } - Commands::Toolchain(ToolchainNamespace { - command: ToolchainCommand::Uninstall(args), + Commands::Python(PythonNamespace { + command: PythonCommand::Uninstall(args), }) => { // Resolve the settings from the command-line arguments and workspace configuration. - let args = settings::ToolchainUninstallSettings::resolve(args, filesystem); + let args = settings::PythonUninstallSettings::resolve(args, filesystem); show_settings!(args); - commands::toolchain_uninstall(args.targets, globals.preview, printer).await + commands::python_uninstall(args.targets, globals.preview, printer).await } - Commands::Toolchain(ToolchainNamespace { - command: ToolchainCommand::Find(args), + Commands::Python(PythonNamespace { + command: PythonCommand::Find(args), }) => { // Resolve the settings from the command-line arguments and workspace configuration. - let args = settings::ToolchainFindSettings::resolve(args, filesystem); + let args = settings::PythonFindSettings::resolve(args, filesystem); // Initialize the cache. let cache = cache.init()?; - commands::toolchain_find( + commands::python_find( args.request, - globals.toolchain_preference, + globals.python_preference, globals.preview, &cache, printer, ) .await } - Commands::Toolchain(ToolchainNamespace { - command: ToolchainCommand::Dir, + Commands::Python(PythonNamespace { + command: PythonCommand::Dir, }) => { - commands::toolchain_dir(globals.preview)?; + commands::python_dir(globals.preview)?; Ok(ExitStatus::Success) } } diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index d2d956a41..823bc9a63 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -13,9 +13,9 @@ use uv_cli::options::{flag, installer_options, resolver_installer_options, resol use uv_cli::{ AddArgs, ColorChoice, Commands, ExternalCommand, GlobalArgs, ListFormat, LockArgs, Maybe, PipCheckArgs, PipCompileArgs, PipFreezeArgs, PipInstallArgs, PipListArgs, PipShowArgs, - PipSyncArgs, PipTreeArgs, PipUninstallArgs, RemoveArgs, RunArgs, SyncArgs, ToolInstallArgs, - ToolListArgs, ToolRunArgs, ToolUninstallArgs, ToolchainFindArgs, ToolchainInstallArgs, - ToolchainListArgs, ToolchainUninstallArgs, VenvArgs, + PipSyncArgs, PipTreeArgs, PipUninstallArgs, PythonFindArgs, PythonInstallArgs, PythonListArgs, + PythonUninstallArgs, RemoveArgs, RunArgs, SyncArgs, ToolInstallArgs, ToolListArgs, ToolRunArgs, + ToolUninstallArgs, VenvArgs, }; use uv_client::Connectivity; use uv_configuration::{ @@ -25,13 +25,13 @@ use uv_configuration::{ }; use uv_distribution::pyproject::DependencyType; use uv_normalize::PackageName; +use uv_python::{Prefix, PythonFetch, PythonPreference, PythonVersion, Target}; use uv_requirements::RequirementsSource; use uv_resolver::{AnnotationStyle, DependencyMode, ExcludeNewer, PreReleaseMode, ResolutionMode}; use uv_settings::{ Combine, FilesystemOptions, InstallerOptions, Options, PipOptions, ResolverInstallerOptions, ResolverOptions, }; -use uv_toolchain::{Prefix, PythonVersion, Target, ToolchainFetch, ToolchainPreference}; use crate::commands::pip::operations::Modifications; @@ -47,8 +47,8 @@ pub(crate) struct GlobalSettings { pub(crate) isolated: bool, pub(crate) show_settings: bool, pub(crate) preview: PreviewMode, - pub(crate) toolchain_preference: ToolchainPreference, - pub(crate) toolchain_fetch: ToolchainFetch, + pub(crate) python_preference: PythonPreference, + pub(crate) python_fetch: PythonFetch, } impl GlobalSettings { @@ -64,17 +64,17 @@ impl GlobalSettings { .unwrap_or(false), ); - // Always use preview mode toolchain preferences during preview commands + // Always use preview mode python preferences during preview commands // TODO(zanieb): There should be a cleaner way to do this, we should probably resolve // force preview to true for these commands but it would break our experimental warning // right now - let default_toolchain_preference = if matches!( + let default_python_preference = if matches!( command, - Commands::Project(_) | Commands::Toolchain(_) | Commands::Tool(_) + Commands::Project(_) | Commands::Python(_) | Commands::Tool(_) ) { - ToolchainPreference::default_from(PreviewMode::Enabled) + PythonPreference::default_from(PreviewMode::Enabled) } else { - ToolchainPreference::default_from(preview) + PythonPreference::default_from(preview) }; Self { @@ -111,13 +111,13 @@ impl GlobalSettings { isolated: args.isolated, show_settings: args.show_settings, preview, - toolchain_preference: args - .toolchain_preference - .combine(workspace.and_then(|workspace| workspace.globals.toolchain_preference)) - .unwrap_or(default_toolchain_preference), - toolchain_fetch: args - .toolchain_fetch - .combine(workspace.and_then(|workspace| workspace.globals.toolchain_fetch)) + python_preference: args + .python_preference + .combine(workspace.and_then(|workspace| workspace.globals.python_preference)) + .unwrap_or(default_python_preference), + python_fetch: args + .python_fetch + .combine(workspace.and_then(|workspace| workspace.globals.python_fetch)) .unwrap_or_default(), } } @@ -314,7 +314,7 @@ impl ToolUninstallSettings { } #[derive(Debug, Clone, Default)] -pub(crate) enum ToolchainListKinds { +pub(crate) enum PythonListKinds { #[default] Default, Installed, @@ -323,26 +323,26 @@ pub(crate) enum ToolchainListKinds { /// The resolved settings to use for a `tool run` invocation. #[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone)] -pub(crate) struct ToolchainListSettings { - pub(crate) kinds: ToolchainListKinds, +pub(crate) struct PythonListSettings { + pub(crate) kinds: PythonListKinds, pub(crate) all_platforms: bool, pub(crate) all_versions: bool, } -impl ToolchainListSettings { - /// Resolve the [`ToolchainListSettings`] from the CLI and filesystem configuration. +impl PythonListSettings { + /// Resolve the [`PythonListSettings`] from the CLI and filesystem configuration. #[allow(clippy::needless_pass_by_value)] - pub(crate) fn resolve(args: ToolchainListArgs, _filesystem: Option) -> Self { - let ToolchainListArgs { + pub(crate) fn resolve(args: PythonListArgs, _filesystem: Option) -> Self { + let PythonListArgs { all_versions, all_platforms, only_installed, } = args; let kinds = if only_installed { - ToolchainListKinds::Installed + PythonListKinds::Installed } else { - ToolchainListKinds::default() + PythonListKinds::default() }; Self { @@ -353,59 +353,56 @@ impl ToolchainListSettings { } } -/// The resolved settings to use for a `toolchain install` invocation. +/// The resolved settings to use for a `python install` invocation. #[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone)] -pub(crate) struct ToolchainInstallSettings { +pub(crate) struct PythonInstallSettings { pub(crate) targets: Vec, pub(crate) force: bool, } -impl ToolchainInstallSettings { - /// Resolve the [`ToolchainInstallSettings`] from the CLI and filesystem configuration. +impl PythonInstallSettings { + /// Resolve the [`PythonInstallSettings`] from the CLI and filesystem configuration. #[allow(clippy::needless_pass_by_value)] - pub(crate) fn resolve( - args: ToolchainInstallArgs, - _filesystem: Option, - ) -> Self { - let ToolchainInstallArgs { targets, force } = args; + pub(crate) fn resolve(args: PythonInstallArgs, _filesystem: Option) -> Self { + let PythonInstallArgs { targets, force } = args; Self { targets, force } } } -/// The resolved settings to use for a `toolchain uninstall` invocation. +/// The resolved settings to use for a `python uninstall` invocation. #[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone)] -pub(crate) struct ToolchainUninstallSettings { +pub(crate) struct PythonUninstallSettings { pub(crate) targets: Vec, } -impl ToolchainUninstallSettings { - /// Resolve the [`ToolchainUninstallSettings`] from the CLI and filesystem configuration. +impl PythonUninstallSettings { + /// Resolve the [`PythonUninstallSettings`] from the CLI and filesystem configuration. #[allow(clippy::needless_pass_by_value)] pub(crate) fn resolve( - args: ToolchainUninstallArgs, + args: PythonUninstallArgs, _filesystem: Option, ) -> Self { - let ToolchainUninstallArgs { targets } = args; + let PythonUninstallArgs { targets } = args; Self { targets } } } -/// The resolved settings to use for a `toolchain find` invocation. +/// The resolved settings to use for a `python find` invocation. #[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone)] -pub(crate) struct ToolchainFindSettings { +pub(crate) struct PythonFindSettings { pub(crate) request: Option, } -impl ToolchainFindSettings { - /// Resolve the [`ToolchainFindSettings`] from the CLI and workspace configuration. +impl PythonFindSettings { + /// Resolve the [`PythonFindSettings`] from the CLI and workspace configuration. #[allow(clippy::needless_pass_by_value)] - pub(crate) fn resolve(args: ToolchainFindArgs, _filesystem: Option) -> Self { - let ToolchainFindArgs { request } = args; + pub(crate) fn resolve(args: PythonFindArgs, _filesystem: Option) -> Self { + let PythonFindArgs { request } = args; Self { request } } diff --git a/crates/uv/tests/common/mod.rs b/crates/uv/tests/common/mod.rs index 1da697e68..15b33e4a8 100644 --- a/crates/uv/tests/common/mod.rs +++ b/crates/uv/tests/common/mod.rs @@ -17,9 +17,9 @@ use regex::Regex; use uv_cache::Cache; use uv_fs::Simplified; -use uv_toolchain::managed::InstalledToolchains; -use uv_toolchain::{ - EnvironmentPreference, PythonVersion, Toolchain, ToolchainPreference, ToolchainRequest, +use uv_python::managed::ManagedPythonInstallations; +use uv_python::{ + EnvironmentPreference, PythonInstallation, PythonPreference, PythonRequest, PythonVersion, }; // Exclude any packages uploaded after this date. @@ -157,7 +157,7 @@ impl TestContext { .iter() .map(|version| PythonVersion::from_str(version).unwrap()) .zip( - python_toolchains_for_versions(&temp_dir, python_versions) + python_installations_for_versions(&temp_dir, python_versions) .expect("Failed to find test Python versions"), ) .collect(); @@ -284,7 +284,7 @@ impl TestContext { /// * Don't wrap text output based on the terminal we're in, the test output doesn't get printed /// but snapshotted to a string. /// * Use a fake `HOME` to avoid accidentally changing the developer's machine. - /// * Hide other Python toolchain with `UV_TOOLCHAIN_DIR` and installed interpreters with + /// * Hide other Python python with `UV_PYTHON_INSTALL_DIR` and installed interpreters with /// `UV_TEST_PYTHON_PATH`. /// * Increase the stack size to avoid stack overflows on windows due to large async functions. pub fn add_shared_args(&self, command: &mut Command) { @@ -294,7 +294,7 @@ impl TestContext { .env("VIRTUAL_ENV", self.venv.as_os_str()) .env("UV_NO_WRAP", "1") .env("HOME", self.home_dir.as_os_str()) - .env("UV_TOOLCHAIN_DIR", "") + .env("UV_PYTHON_INSTALL_DIR", "") .env("UV_TEST_PYTHON_PATH", &self.python_path()) .env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER) .current_dir(self.temp_dir.path()); @@ -371,23 +371,23 @@ impl TestContext { command } - /// Create a `uv toolchain find` command with options shared across scenarios. - pub fn toolchain_find(&self) -> Command { + /// Create a `uv python find` command with options shared across scenarios. + pub fn python_find(&self) -> Command { let mut command = Command::new(get_bin()); command - .arg("toolchain") + .arg("python") .arg("find") .env("UV_PREVIEW", "1") - .env("UV_TOOLCHAIN_DIR", "") + .env("UV_PYTHON_INSTALL_DIR", "") .current_dir(&self.temp_dir); self.add_shared_args(&mut command); command } - /// Create a `uv toolchain dir` command with options shared across scenarios. - pub fn toolchain_dir(&self) -> Command { + /// Create a `uv python dir` command with options shared across scenarios. + pub fn python_dir(&self) -> Command { let mut command = Command::new(get_bin()); - command.arg("toolchain").arg("dir"); + command.arg("python").arg("dir"); self.add_shared_args(&mut command); command } @@ -601,7 +601,7 @@ impl TestContext { /// Create a new virtual environment named `.venv` in the test context. fn create_venv(&self) { - let executable = get_toolchain( + let executable = get_python( self.python_version .as_ref() .expect("A Python version must be provided to create a test virtual environment"), @@ -640,18 +640,18 @@ pub fn venv_to_interpreter(venv: &Path) -> PathBuf { } } -/// Get the path to the python interpreter for a specific toolchain version. -pub fn get_toolchain(version: &PythonVersion) -> PathBuf { - InstalledToolchains::from_settings() - .map(|installed_toolchains| { - installed_toolchains +/// Get the path to the python interpreter for a specific python version. +pub fn get_python(version: &PythonVersion) -> PathBuf { + ManagedPythonInstallations::from_settings() + .map(|installed_pythons| { + installed_pythons .find_version(version) .expect("Tests are run on a supported platform") .next() .as_ref() - .map(uv_toolchain::managed::InstalledToolchain::executable) + .map(uv_python::managed::ManagedPythonInstallation::executable) }) - // We'll search for the request Python on the PATH if not found in the toolchain versions + // We'll search for the request Python on the PATH if not found in the python versions // We hack this into a `PathBuf` to satisfy the compiler but it's just a string .unwrap_or_default() .unwrap_or(PathBuf::from(version.to_string())) @@ -691,7 +691,7 @@ pub fn python_path_with_versions( python_versions: &[&str], ) -> anyhow::Result { Ok(std::env::join_paths( - python_toolchains_for_versions(temp_dir, python_versions)? + python_installations_for_versions(temp_dir, python_versions)? .into_iter() .map(|path| path.parent().unwrap().to_path_buf()), )?) @@ -700,7 +700,7 @@ pub fn python_path_with_versions( /// Returns a list of Python executables for the given versions. /// /// Generally this should be used with `UV_TEST_PYTHON_PATH`. -pub fn python_toolchains_for_versions( +pub fn python_installations_for_versions( temp_dir: &assert_fs::TempDir, python_versions: &[&str], ) -> anyhow::Result> { @@ -708,13 +708,13 @@ pub fn python_toolchains_for_versions( let selected_pythons = python_versions .iter() .map(|python_version| { - if let Ok(toolchain) = Toolchain::find( - &ToolchainRequest::parse(python_version), + if let Ok(python) = PythonInstallation::find( + &PythonRequest::parse(python_version), EnvironmentPreference::OnlySystem, - ToolchainPreference::Managed, + PythonPreference::Managed, &cache, ) { - toolchain.into_interpreter().sys_executable().to_owned() + python.into_interpreter().sys_executable().to_owned() } else { panic!("Could not find Python {python_version} for test"); } diff --git a/crates/uv/tests/lock.rs b/crates/uv/tests/lock.rs index 376e59418..1e51f4f28 100644 --- a/crates/uv/tests/lock.rs +++ b/crates/uv/tests/lock.rs @@ -2034,13 +2034,13 @@ fn lock_requires_python() -> Result<()> { .filters() .into_iter() .chain(context.filters()) - // Platform independent message for the missing toolchain + // Platform independent message for the missing Python installation .chain([(" or `py` launcher", "")]) .collect(); // Install from the lockfile. - // Note we need to disable toolchain fetches or we'll just download 3.12 - uv_snapshot!(filters, context38.sync().arg("--toolchain-fetch").arg("manual"), @r###" + // Note we need to disable Python fetches or we'll just download 3.12 + uv_snapshot!(filters, context38.sync().arg("--python-fetch").arg("manual"), @r###" success: false exit_code: 2 ----- stdout ----- diff --git a/crates/uv/tests/python_dir.rs b/crates/uv/tests/python_dir.rs new file mode 100644 index 000000000..ac480948e --- /dev/null +++ b/crates/uv/tests/python_dir.rs @@ -0,0 +1,21 @@ +use assert_fs::fixture::PathChild; +use common::{uv_snapshot, TestContext}; + +mod common; + +#[test] +fn python_dir() { + let context = TestContext::new("3.12"); + + let python_dir = context.temp_dir.child("python"); + uv_snapshot!(context.filters(), context.python_dir() + .env("UV_PYTHON_INSTALL_DIR", python_dir.as_os_str()), @r###" + success: true + exit_code: 0 + ----- stdout ----- + [TEMP_DIR]/python + + ----- stderr ----- + warning: `uv python dir` is experimental and may change without warning. + "###); +} diff --git a/crates/uv/tests/toolchain_find.rs b/crates/uv/tests/python_find.rs similarity index 69% rename from crates/uv/tests/toolchain_find.rs rename to crates/uv/tests/python_find.rs index 4d54d6566..fb2cd9b75 100644 --- a/crates/uv/tests/toolchain_find.rs +++ b/crates/uv/tests/python_find.rs @@ -1,17 +1,17 @@ #![cfg(all(feature = "python", feature = "pypi"))] use common::{uv_snapshot, TestContext}; -use uv_toolchain::platform::{Arch, Os}; +use uv_python::platform::{Arch, Os}; mod common; #[test] -fn toolchain_find() { +fn python_find() { let mut context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]); // No interpreters on the path if cfg!(windows) { - uv_snapshot!(context.filters(), context.toolchain_find().env("UV_TEST_PYTHON_PATH", ""), @r###" + uv_snapshot!(context.filters(), context.python_find().env("UV_TEST_PYTHON_PATH", ""), @r###" success: false exit_code: 2 ----- stdout ----- @@ -20,7 +20,7 @@ fn toolchain_find() { error: No interpreter found in system path or `py` launcher "###); } else { - uv_snapshot!(context.filters(), context.toolchain_find().env("UV_TEST_PYTHON_PATH", ""), @r###" + uv_snapshot!(context.filters(), context.python_find().env("UV_TEST_PYTHON_PATH", ""), @r###" success: false exit_code: 2 ----- stdout ----- @@ -31,7 +31,7 @@ fn toolchain_find() { } // We find the first interpreter on the path - uv_snapshot!(context.filters(), context.toolchain_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @r###" success: true exit_code: 0 ----- stdout ----- @@ -41,7 +41,7 @@ fn toolchain_find() { "###); // Request Python 3.12 - uv_snapshot!(context.filters(), context.toolchain_find().arg("3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.12"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -51,7 +51,7 @@ fn toolchain_find() { "###); // Request Python 3.11 - uv_snapshot!(context.filters(), context.toolchain_find().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -61,7 +61,7 @@ fn toolchain_find() { "###); // Request CPython - uv_snapshot!(context.filters(), context.toolchain_find().arg("cpython"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("cpython"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -71,7 +71,7 @@ fn toolchain_find() { "###); // Request CPython 3.12 - uv_snapshot!(context.filters(), context.toolchain_find().arg("cpython@3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("cpython@3.12"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -81,7 +81,7 @@ fn toolchain_find() { "###); // Request CPython 3.12 via partial key syntax - uv_snapshot!(context.filters(), context.toolchain_find().arg("cpython-3.12"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("cpython-3.12"), @r###" success: true exit_code: 0 ----- stdout ----- @@ -94,7 +94,7 @@ fn toolchain_find() { let os = Os::from_env(); let arch = Arch::from_env(); - uv_snapshot!(context.filters(), context.toolchain_find() + uv_snapshot!(context.filters(), context.python_find() .arg(format!("cpython-3.12-{os}-{arch}")) , @r###" success: true @@ -107,7 +107,7 @@ fn toolchain_find() { // Request PyPy (which should be missing) if cfg!(windows) { - uv_snapshot!(context.filters(), context.toolchain_find().arg("pypy"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("pypy"), @r###" success: false exit_code: 2 ----- stdout ----- @@ -116,7 +116,7 @@ fn toolchain_find() { error: No interpreter found for PyPy in system path or `py` launcher "###); } else { - uv_snapshot!(context.filters(), context.toolchain_find().arg("pypy"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("pypy"), @r###" success: false exit_code: 2 ----- stdout ----- @@ -129,7 +129,7 @@ fn toolchain_find() { // Swap the order of the Python versions context.python_versions.reverse(); - uv_snapshot!(context.filters(), context.toolchain_find(), @r###" + uv_snapshot!(context.filters(), context.python_find(), @r###" success: true exit_code: 0 ----- stdout ----- @@ -139,7 +139,7 @@ fn toolchain_find() { "###); // Request Python 3.11 - uv_snapshot!(context.filters(), context.toolchain_find().arg("3.11"), @r###" + uv_snapshot!(context.filters(), context.python_find().arg("3.11"), @r###" success: true exit_code: 0 ----- stdout ----- diff --git a/crates/uv/tests/show_settings.rs b/crates/uv/tests/show_settings.rs index b133320b2..2d8b4897c 100644 --- a/crates/uv/tests/show_settings.rs +++ b/crates/uv/tests/show_settings.rs @@ -57,8 +57,8 @@ fn resolve_uv_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -189,8 +189,8 @@ fn resolve_uv_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -322,8 +322,8 @@ fn resolve_uv_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -487,8 +487,8 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -621,8 +621,8 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -741,8 +741,8 @@ fn resolve_pyproject_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -898,8 +898,8 @@ fn resolve_index_url() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1055,8 +1055,8 @@ fn resolve_index_url() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1257,8 +1257,8 @@ fn resolve_find_links() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1408,8 +1408,8 @@ fn resolve_top_level() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1534,8 +1534,8 @@ fn resolve_top_level() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1688,8 +1688,8 @@ fn resolve_top_level() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1866,8 +1866,8 @@ fn resolve_user_configuration() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -1982,8 +1982,8 @@ fn resolve_user_configuration() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -2098,8 +2098,8 @@ fn resolve_user_configuration() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -2216,8 +2216,8 @@ fn resolve_user_configuration() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, @@ -2359,8 +2359,8 @@ fn resolve_poetry_toml() -> anyhow::Result<()> { isolated: false, show_settings: true, preview: Disabled, - toolchain_preference: OnlySystem, - toolchain_fetch: Automatic, + python_preference: OnlySystem, + python_fetch: Automatic, } CacheSettings { no_cache: false, diff --git a/crates/uv/tests/toolchain_dir.rs b/crates/uv/tests/toolchain_dir.rs deleted file mode 100644 index b2c877357..000000000 --- a/crates/uv/tests/toolchain_dir.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![cfg(all(feature = "python", feature = "pypi"))] - -use assert_fs::fixture::PathChild; -use common::{uv_snapshot, TestContext}; - -mod common; - -#[test] -fn toolchain_dir() { - let context = TestContext::new("3.12"); - - let toolchain_dir = context.temp_dir.child("toolchains"); - uv_snapshot!(context.filters(), context.toolchain_dir() - .env("UV_TOOLCHAIN_DIR", toolchain_dir.as_os_str()), @r###" - success: true - exit_code: 0 - ----- stdout ----- - [TEMP_DIR]/toolchains - - ----- stderr ----- - warning: `uv toolchain dir` is experimental and may change without warning. - "###); -} diff --git a/docs/first-steps.md b/docs/first-steps.md index fd1e61c38..2cfe9c983 100644 --- a/docs/first-steps.md +++ b/docs/first-steps.md @@ -29,9 +29,9 @@ See the documentation on [projects](./preview/projects.md) for more details on g These commands are used to manage Python itself. uv is capable of installing and managing multiple Python versions. -- `uv toolchain install` -- `uv toolchain list` -- `uv toolchain find` +- `uv python install` +- `uv python list` +- `uv python find` See the documentation on [toolchains](./preview/toolchains.md) for more details on getting started. diff --git a/docs/preview/toolchains.md b/docs/preview/toolchains.md index ba0e7c7ff..602181cc3 100644 --- a/docs/preview/toolchains.md +++ b/docs/preview/toolchains.md @@ -41,30 +41,30 @@ Sometimes it is preferable to install the toolchains before they are needed. To install a toolchain at a specific version: ```bash -uv toolchain install 3.12.3 +uv python install 3.12.3 ``` To install the latest patch version: ```bash -uv toolchain install 3.12 +uv python install 3.12 ``` To install a version that satisfies constraints: ```bash -uv toolchain install '>=3.8,<3.10' +uv python install '>=3.8,<3.10' ``` To install multiple versions: ```bash -uv toolchain install 3.9 3.10 3.11 +uv python install 3.9 3.10 3.11 ``` ## Installing project toolchains -By default `uv toolchain install` will verify that a managed toolchain is installed or install the latest version. +By default `uv python install` will verify that a managed toolchain is installed or install the latest version. However, a project may define a `.python-version` file specifying the default Python toolchain to be used. If present, uv will install the toolchain listed in the file. @@ -79,7 +79,7 @@ uv will also respect Python requirements defined in a `pyproject.toml` file duri To list installed and available toolchains: ```bash -uv toolchain list +uv python list ``` By default, downloads for other platforms and old patch versions are hidden. @@ -87,19 +87,19 @@ By default, downloads for other platforms and old patch versions are hidden. To view all versions: ```bash -uv toolchain list --all-versions +uv python list --all-versions ``` To view toolchains for other platforms: ```bash -uv toolchain list --all-platforms +uv python list --all-platforms ``` To exclude downloads and only show installed toolchains: ```bash -uv toolchain list --only-installed +uv python list --only-installed ``` ## Adjusting toolchain preferences @@ -120,7 +120,7 @@ These options allow disabling uv's managed toolchains entirely or always using t When searching for a toolchain, the following locations are checked: -- Managed toolchains in the `UV_TOOLCHAIN_DIR`. +- Managed toolchains in the `UV_PYTHON_INSTALL_DIR`. - A Python interpreter on the `PATH` as `python3` on macOS and Linux, or `python.exe` on Windows. - On Windows, the Python interpreter returned by `py --list-paths` that matches the requested version. diff --git a/uv.schema.json b/uv.schema.json index 2ffd3d961..61e7b2d7b 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -201,6 +201,26 @@ "null" ] }, + "python-fetch": { + "anyOf": [ + { + "$ref": "#/definitions/PythonFetch" + }, + { + "type": "null" + } + ] + }, + "python-preference": { + "anyOf": [ + { + "$ref": "#/definitions/PythonPreference" + }, + { + "type": "null" + } + ] + }, "reinstall": { "type": [ "boolean", @@ -235,26 +255,6 @@ "$ref": "#/definitions/Source" } }, - "toolchain-fetch": { - "anyOf": [ - { - "$ref": "#/definitions/ToolchainFetch" - }, - { - "type": "null" - } - ] - }, - "toolchain-preference": { - "anyOf": [ - { - "$ref": "#/definitions/ToolchainPreference" - }, - { - "type": "null" - } - ] - }, "upgrade": { "type": [ "boolean", @@ -871,6 +871,63 @@ } ] }, + "PythonFetch": { + "oneOf": [ + { + "description": "Automatically fetch managed Python installations when needed.", + "type": "string", + "enum": [ + "automatic" + ] + }, + { + "description": "Do not automatically fetch managed Python installations; require explicit installation.", + "type": "string", + "enum": [ + "manual" + ] + } + ] + }, + "PythonPreference": { + "oneOf": [ + { + "description": "Only use managed Python installations; never use system Python installations.", + "type": "string", + "enum": [ + "only-managed" + ] + }, + { + "description": "Prefer installed Python installations, only download managed Python installations if no system Python installation is found.\n\nInstalled managed Python installations are still preferred over system Python installations.", + "type": "string", + "enum": [ + "installed" + ] + }, + { + "description": "Prefer managed Python installations over system Python installations, even if fetching is required.", + "type": "string", + "enum": [ + "managed" + ] + }, + { + "description": "Prefer system Python installations over managed Python installations.\n\nIf a system Python installation cannot be found, a managed Python installation can be used.", + "type": "string", + "enum": [ + "system" + ] + }, + { + "description": "Only use system Python installations; never use managed Python installations.", + "type": "string", + "enum": [ + "only-system" + ] + } + ] + }, "PythonVersion": { "description": "A Python version specifier, e.g. `3.7` or `3.8.0`.", "type": "string", @@ -1202,63 +1259,6 @@ } } } - }, - "ToolchainFetch": { - "oneOf": [ - { - "description": "Automatically fetch managed toolchains when needed.", - "type": "string", - "enum": [ - "automatic" - ] - }, - { - "description": "Do not automatically fetch managed toolchains; require explicit installation.", - "type": "string", - "enum": [ - "manual" - ] - } - ] - }, - "ToolchainPreference": { - "oneOf": [ - { - "description": "Only use managed toolchains; never use system toolchains.", - "type": "string", - "enum": [ - "only-managed" - ] - }, - { - "description": "Prefer installed toolchains, only download managed toolchains if no system toolchain is found.\n\nInstalled managed toolchains are still preferred over system toolchains.", - "type": "string", - "enum": [ - "installed" - ] - }, - { - "description": "Prefer managed toolchains over system toolchains, even if fetching is required.", - "type": "string", - "enum": [ - "managed" - ] - }, - { - "description": "Prefer system toolchains over managed toolchains.\n\nIf a system toolchain cannot be found, a managed toolchain can be used.", - "type": "string", - "enum": [ - "system" - ] - }, - { - "description": "Only use system toolchains; never use managed toolchains.", - "type": "string", - "enum": [ - "only-system" - ] - } - ] } } } \ No newline at end of file