mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Rename uv-interpreter
crate to uv-toolchain
(#4120)
In preparation for managed toolchains #2607, just renames the crate to something broader. See #4121 and https://github.com/astral-sh/uv/pull/4138 to see the final intent.
This commit is contained in:
parent
2803a8c475
commit
325982c418
78 changed files with 117 additions and 117 deletions
108
Cargo.lock
generated
108
Cargo.lock
generated
|
@ -407,8 +407,8 @@ dependencies = [
|
||||||
"uv-dispatch",
|
"uv-dispatch",
|
||||||
"uv-distribution",
|
"uv-distribution",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-resolver",
|
"uv-resolver",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -4424,10 +4424,10 @@ dependencies = [
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-installer",
|
"uv-installer",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-normalize",
|
"uv-normalize",
|
||||||
"uv-requirements",
|
"uv-requirements",
|
||||||
"uv-resolver",
|
"uv-resolver",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
"uv-virtualenv",
|
"uv-virtualenv",
|
||||||
"uv-warnings",
|
"uv-warnings",
|
||||||
|
@ -4483,7 +4483,7 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"uv-configuration",
|
"uv-configuration",
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-interpreter",
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
"uv-virtualenv",
|
"uv-virtualenv",
|
||||||
]
|
]
|
||||||
|
@ -4619,8 +4619,8 @@ dependencies = [
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-installer",
|
"uv-installer",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-resolver",
|
"uv-resolver",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
"uv-workspace",
|
"uv-workspace",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
|
@ -4645,8 +4645,8 @@ dependencies = [
|
||||||
"uv-distribution",
|
"uv-distribution",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-installer",
|
"uv-installer",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-resolver",
|
"uv-resolver",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -4787,57 +4787,13 @@ dependencies = [
|
||||||
"uv-extract",
|
"uv-extract",
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-normalize",
|
"uv-normalize",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
"uv-warnings",
|
"uv-warnings",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "uv-interpreter"
|
|
||||||
version = "0.0.1"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"assert_fs",
|
|
||||||
"cache-key",
|
|
||||||
"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",
|
|
||||||
"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]]
|
[[package]]
|
||||||
name = "uv-normalize"
|
name = "uv-normalize"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
@ -4925,8 +4881,8 @@ dependencies = [
|
||||||
"uv-configuration",
|
"uv-configuration",
|
||||||
"uv-distribution",
|
"uv-distribution",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-normalize",
|
"uv-normalize",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-types",
|
"uv-types",
|
||||||
"uv-warnings",
|
"uv-warnings",
|
||||||
]
|
]
|
||||||
|
@ -4940,6 +4896,50 @@ dependencies = [
|
||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "uv-toolchain"
|
||||||
|
version = "0.0.1"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"assert_fs",
|
||||||
|
"cache-key",
|
||||||
|
"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",
|
||||||
|
"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]]
|
[[package]]
|
||||||
name = "uv-types"
|
name = "uv-types"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
@ -4956,8 +4956,8 @@ dependencies = [
|
||||||
"uv-cache",
|
"uv-cache",
|
||||||
"uv-configuration",
|
"uv-configuration",
|
||||||
"uv-git",
|
"uv-git",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-normalize",
|
"uv-normalize",
|
||||||
|
"uv-toolchain",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4976,7 +4976,7 @@ dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tracing",
|
"tracing",
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-interpreter",
|
"uv-toolchain",
|
||||||
"uv-version",
|
"uv-version",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -5007,9 +5007,9 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"uv-configuration",
|
"uv-configuration",
|
||||||
"uv-fs",
|
"uv-fs",
|
||||||
"uv-interpreter",
|
|
||||||
"uv-normalize",
|
"uv-normalize",
|
||||||
"uv-resolver",
|
"uv-resolver",
|
||||||
|
"uv-toolchain",
|
||||||
"uv-warnings",
|
"uv-warnings",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ uv-extract = { path = "crates/uv-extract" }
|
||||||
uv-fs = { path = "crates/uv-fs" }
|
uv-fs = { path = "crates/uv-fs" }
|
||||||
uv-git = { path = "crates/uv-git" }
|
uv-git = { path = "crates/uv-git" }
|
||||||
uv-installer = { path = "crates/uv-installer" }
|
uv-installer = { path = "crates/uv-installer" }
|
||||||
uv-interpreter = { path = "crates/uv-interpreter" }
|
uv-toolchain = { path = "crates/uv-toolchain" }
|
||||||
uv-normalize = { path = "crates/uv-normalize" }
|
uv-normalize = { path = "crates/uv-normalize" }
|
||||||
uv-requirements = { path = "crates/uv-requirements" }
|
uv-requirements = { path = "crates/uv-requirements" }
|
||||||
uv-resolver = { path = "crates/uv-resolver" }
|
uv-resolver = { path = "crates/uv-resolver" }
|
||||||
|
|
|
@ -89,7 +89,7 @@ Functionality for interacting with Git repositories.
|
||||||
|
|
||||||
Functionality for installing Python packages into a virtual environment.
|
Functionality for installing Python packages into a virtual environment.
|
||||||
|
|
||||||
## [uv-interpreter](./uv-interpreter)
|
## [uv-toolchain](./uv-toolchain)
|
||||||
|
|
||||||
Functionality for detecting and leveraging the current Python interpreter.
|
Functionality for detecting and leveraging the current Python interpreter.
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ uv-configuration = { workspace = true }
|
||||||
uv-dispatch = { workspace = true }
|
uv-dispatch = { workspace = true }
|
||||||
uv-distribution = { workspace = true }
|
uv-distribution = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-resolver = { workspace = true }
|
uv-resolver = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ use bench::criterion::{criterion_group, criterion_main, measurement::WallTime, C
|
||||||
use pypi_types::Requirement;
|
use pypi_types::Requirement;
|
||||||
use uv_cache::Cache;
|
use uv_cache::Cache;
|
||||||
use uv_client::RegistryClientBuilder;
|
use uv_client::RegistryClientBuilder;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_resolver::Manifest;
|
use uv_resolver::Manifest;
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
|
|
||||||
fn resolve_warm_jupyter(c: &mut Criterion<WallTime>) {
|
fn resolve_warm_jupyter(c: &mut Criterion<WallTime>) {
|
||||||
let runtime = &tokio::runtime::Builder::new_current_thread()
|
let runtime = &tokio::runtime::Builder::new_current_thread()
|
||||||
|
@ -86,10 +86,10 @@ mod resolver {
|
||||||
use uv_dispatch::BuildDispatch;
|
use uv_dispatch::BuildDispatch;
|
||||||
use uv_distribution::DistributionDatabase;
|
use uv_distribution::DistributionDatabase;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_resolver::{
|
use uv_resolver::{
|
||||||
FlatIndex, InMemoryIndex, Manifest, Options, PythonRequirement, ResolutionGraph, Resolver,
|
FlatIndex, InMemoryIndex, Manifest, Options, PythonRequirement, ResolutionGraph, Resolver,
|
||||||
};
|
};
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
||||||
|
|
||||||
static MARKERS: Lazy<MarkerEnvironment> = Lazy::new(|| {
|
static MARKERS: Lazy<MarkerEnvironment> = Lazy::new(|| {
|
||||||
|
|
|
@ -19,7 +19,7 @@ pep440_rs = { workspace = true }
|
||||||
pep508_rs = { workspace = true }
|
pep508_rs = { workspace = true }
|
||||||
pypi-types = { workspace = true }
|
pypi-types = { workspace = true }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
uv-configuration = { workspace = true }
|
uv-configuration = { workspace = true }
|
||||||
uv-virtualenv = { workspace = true }
|
uv-virtualenv = { workspace = true }
|
||||||
|
|
|
@ -31,7 +31,7 @@ use pep508_rs::PackageName;
|
||||||
use pypi_types::{Requirement, VerbatimParsedUrl};
|
use pypi_types::{Requirement, VerbatimParsedUrl};
|
||||||
use uv_configuration::{BuildKind, ConfigSettings, SetupPyStrategy};
|
use uv_configuration::{BuildKind, ConfigSettings, SetupPyStrategy};
|
||||||
use uv_fs::{PythonExt, Simplified};
|
use uv_fs::{PythonExt, Simplified};
|
||||||
use uv_interpreter::{Interpreter, PythonEnvironment};
|
use uv_toolchain::{Interpreter, PythonEnvironment};
|
||||||
use uv_types::{BuildContext, BuildIsolation, SourceBuildTrait};
|
use uv_types::{BuildContext, BuildIsolation, SourceBuildTrait};
|
||||||
|
|
||||||
/// e.g. `pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory`
|
/// e.g. `pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory`
|
||||||
|
|
|
@ -30,7 +30,7 @@ uv-distribution = { workspace = true, features = ["schemars"] }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-installer = { workspace = true }
|
uv-installer = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-resolver = { workspace = true }
|
uv-resolver = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
uv-workspace = { workspace = true, features = ["schemars"] }
|
uv-workspace = { workspace = true, features = ["schemars"] }
|
||||||
|
|
|
@ -15,8 +15,8 @@ use uv_configuration::{
|
||||||
};
|
};
|
||||||
use uv_dispatch::BuildDispatch;
|
use uv_dispatch::BuildDispatch;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_resolver::{FlatIndex, InMemoryIndex};
|
use uv_resolver::{FlatIndex, InMemoryIndex};
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::{BuildContext, BuildIsolation, InFlight};
|
use uv_types::{BuildContext, BuildIsolation, InFlight};
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::path::PathBuf;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
use uv_cache::{Cache, CacheArgs};
|
use uv_cache::{Cache, CacheArgs};
|
||||||
use uv_interpreter::PythonEnvironment;
|
use uv_toolchain::PythonEnvironment;
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
pub(crate) struct CompileArgs {
|
pub(crate) struct CompileArgs {
|
||||||
|
|
|
@ -13,8 +13,8 @@ use tokio::time::Instant;
|
||||||
use tracing::{info, info_span, Instrument};
|
use tracing::{info, info_span, Instrument};
|
||||||
|
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_interpreter::downloads::{DownloadResult, Error, PythonDownload, PythonDownloadRequest};
|
use uv_toolchain::downloads::{DownloadResult, Error, PythonDownload, PythonDownloadRequest};
|
||||||
use uv_interpreter::managed::InstalledToolchains;
|
use uv_toolchain::managed::InstalledToolchains;
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
pub(crate) struct FetchPythonArgs {
|
pub(crate) struct FetchPythonArgs {
|
||||||
|
|
|
@ -24,7 +24,7 @@ uv-configuration = { workspace = true }
|
||||||
uv-distribution = { workspace = true }
|
uv-distribution = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-installer = { workspace = true }
|
uv-installer = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-resolver = { workspace = true }
|
uv-resolver = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ use uv_configuration::{Concurrency, PreviewMode};
|
||||||
use uv_distribution::DistributionDatabase;
|
use uv_distribution::DistributionDatabase;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_installer::{Downloader, Installer, Plan, Planner, SitePackages};
|
use uv_installer::{Downloader, Installer, Plan, Planner, SitePackages};
|
||||||
use uv_interpreter::{Interpreter, PythonEnvironment};
|
|
||||||
use uv_resolver::{FlatIndex, InMemoryIndex, Manifest, Options, PythonRequirement, Resolver};
|
use uv_resolver::{FlatIndex, InMemoryIndex, Manifest, Options, PythonRequirement, Resolver};
|
||||||
|
use uv_toolchain::{Interpreter, PythonEnvironment};
|
||||||
use uv_types::{BuildContext, BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
use uv_types::{BuildContext, BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
||||||
|
|
||||||
/// The main implementation of [`BuildContext`], used by the CLI, see [`BuildContext`]
|
/// The main implementation of [`BuildContext`], used by the CLI, see [`BuildContext`]
|
||||||
|
|
|
@ -27,7 +27,7 @@ uv-distribution = { workspace = true }
|
||||||
uv-extract = { workspace = true }
|
uv-extract = { workspace = true }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-normalize = { workspace = true }
|
uv-normalize = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
uv-warnings = { workspace = true }
|
uv-warnings = { workspace = true }
|
||||||
|
|
|
@ -3,7 +3,7 @@ use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
|
|
||||||
use distribution_types::CachedDist;
|
use distribution_types::CachedDist;
|
||||||
use uv_interpreter::PythonEnvironment;
|
use uv_toolchain::PythonEnvironment;
|
||||||
|
|
||||||
pub struct Installer<'a> {
|
pub struct Installer<'a> {
|
||||||
venv: &'a PythonEnvironment,
|
venv: &'a PythonEnvironment,
|
||||||
|
|
|
@ -22,7 +22,7 @@ use uv_distribution::{
|
||||||
};
|
};
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitUrl;
|
use uv_git::GitUrl;
|
||||||
use uv_interpreter::PythonEnvironment;
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::HashStrategy;
|
use uv_types::HashStrategy;
|
||||||
|
|
||||||
use crate::satisfies::RequirementSatisfaction;
|
use crate::satisfies::RequirementSatisfaction;
|
||||||
|
|
|
@ -12,8 +12,8 @@ use distribution_types::{
|
||||||
};
|
};
|
||||||
use pep440_rs::{Version, VersionSpecifiers};
|
use pep440_rs::{Version, VersionSpecifiers};
|
||||||
use pypi_types::{Requirement, VerbatimParsedUrl};
|
use pypi_types::{Requirement, VerbatimParsedUrl};
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::InstalledPackagesProvider;
|
use uv_types::InstalledPackagesProvider;
|
||||||
|
|
||||||
use crate::satisfies::RequirementSatisfaction;
|
use crate::satisfies::RequirementSatisfaction;
|
||||||
|
|
|
@ -27,7 +27,7 @@ uv-client = { workspace = true }
|
||||||
uv-configuration = { workspace = true }
|
uv-configuration = { workspace = true }
|
||||||
uv-distribution = { workspace = true }
|
uv-distribution = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-normalize = { workspace = true }
|
uv-normalize = { workspace = true }
|
||||||
uv-types = { workspace = true }
|
uv-types = { workspace = true }
|
||||||
uv-warnings = { workspace = true }
|
uv-warnings = { workspace = true }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use pep440_rs::VersionSpecifiers;
|
use pep440_rs::VersionSpecifiers;
|
||||||
use pep508_rs::StringVersion;
|
use pep508_rs::StringVersion;
|
||||||
use uv_interpreter::{Interpreter, PythonVersion};
|
use uv_toolchain::{Interpreter, PythonVersion};
|
||||||
|
|
||||||
use crate::RequiresPython;
|
use crate::RequiresPython;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "uv-interpreter"
|
name = "uv-toolchain"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
|
@ -21,7 +21,7 @@ pypi-types = { workspace = true }
|
||||||
uv-cache = { workspace = true }
|
uv-cache = { workspace = true }
|
||||||
uv-configuration = { workspace = true }
|
uv-configuration = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-normalize = { workspace = true }
|
uv-normalize = { workspace = true }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use uv_interpreter::PythonEnvironment;
|
use uv_toolchain::PythonEnvironment;
|
||||||
|
|
||||||
/// Whether to enforce build isolation when building source distributions.
|
/// Whether to enforce build isolation when building source distributions.
|
||||||
#[derive(Debug, Default, Copy, Clone)]
|
#[derive(Debug, Default, Copy, Clone)]
|
||||||
|
|
|
@ -9,7 +9,7 @@ use pypi_types::Requirement;
|
||||||
use uv_cache::Cache;
|
use uv_cache::Cache;
|
||||||
use uv_configuration::{BuildKind, NoBinary, NoBuild, SetupPyStrategy};
|
use uv_configuration::{BuildKind, NoBinary, NoBuild, SetupPyStrategy};
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::{Interpreter, PythonEnvironment};
|
use uv_toolchain::{Interpreter, PythonEnvironment};
|
||||||
|
|
||||||
use crate::BuildIsolation;
|
use crate::BuildIsolation;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ workspace = true
|
||||||
platform-tags = { workspace = true }
|
platform-tags = { workspace = true }
|
||||||
pypi-types = { workspace = true }
|
pypi-types = { workspace = true }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-version = { workspace = true }
|
uv-version = { workspace = true }
|
||||||
|
|
||||||
fs-err = { workspace = true }
|
fs-err = { workspace = true }
|
||||||
|
|
|
@ -13,7 +13,7 @@ use tracing::info;
|
||||||
|
|
||||||
use pypi_types::Scheme;
|
use pypi_types::Scheme;
|
||||||
use uv_fs::{cachedir, Simplified};
|
use uv_fs::{cachedir, Simplified};
|
||||||
use uv_interpreter::{Interpreter, VirtualEnvironment};
|
use uv_toolchain::{Interpreter, VirtualEnvironment};
|
||||||
use uv_version::version;
|
use uv_version::version;
|
||||||
|
|
||||||
use crate::{Error, Prompt};
|
use crate::{Error, Prompt};
|
||||||
|
|
|
@ -4,7 +4,7 @@ use std::path::Path;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use platform_tags::PlatformError;
|
use platform_tags::PlatformError;
|
||||||
use uv_interpreter::{Interpreter, PythonEnvironment};
|
use uv_toolchain::{Interpreter, PythonEnvironment};
|
||||||
|
|
||||||
pub use crate::bare::create_bare_venv;
|
pub use crate::bare::create_bare_venv;
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ pub enum Error {
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
IO(#[from] io::Error),
|
IO(#[from] io::Error),
|
||||||
#[error("Failed to determine Python interpreter to use")]
|
#[error("Failed to determine Python interpreter to use")]
|
||||||
Discovery(#[from] uv_interpreter::DiscoveryError),
|
Discovery(#[from] uv_toolchain::DiscoveryError),
|
||||||
#[error("Failed to determine Python interpreter to use")]
|
#[error("Failed to determine Python interpreter to use")]
|
||||||
InterpreterNotFound(#[from] uv_interpreter::InterpreterNotFound),
|
InterpreterNotFound(#[from] uv_toolchain::InterpreterNotFound),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Platform(#[from] PlatformError),
|
Platform(#[from] PlatformError),
|
||||||
#[error("Could not find a suitable Python executable for the virtual environment based on the interpreter: {0}")]
|
#[error("Could not find a suitable Python executable for the virtual environment based on the interpreter: {0}")]
|
||||||
|
|
|
@ -21,7 +21,7 @@ uv-configuration = { workspace = true, features = ["schemars"] }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-normalize = { workspace = true, features = ["schemars"] }
|
uv-normalize = { workspace = true, features = ["schemars"] }
|
||||||
uv-resolver = { workspace = true, features = ["schemars"] }
|
uv-resolver = { workspace = true, features = ["schemars"] }
|
||||||
uv-interpreter = { workspace = true, features = ["schemars"] }
|
uv-toolchain = { workspace = true, features = ["schemars"] }
|
||||||
uv-warnings = { workspace = true }
|
uv-warnings = { workspace = true }
|
||||||
|
|
||||||
dirs-sys = { workspace = true }
|
dirs-sys = { workspace = true }
|
||||||
|
|
|
@ -4,8 +4,8 @@ use std::path::PathBuf;
|
||||||
use distribution_types::IndexUrl;
|
use distribution_types::IndexUrl;
|
||||||
use install_wheel_rs::linker::LinkMode;
|
use install_wheel_rs::linker::LinkMode;
|
||||||
use uv_configuration::{ConfigSettings, IndexStrategy, KeyringProviderType, TargetTriple};
|
use uv_configuration::{ConfigSettings, IndexStrategy, KeyringProviderType, TargetTriple};
|
||||||
use uv_interpreter::PythonVersion;
|
|
||||||
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
||||||
|
use uv_toolchain::PythonVersion;
|
||||||
|
|
||||||
use crate::{Options, PipOptions, Workspace};
|
use crate::{Options, PipOptions, Workspace};
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@ use pypi_types::VerbatimParsedUrl;
|
||||||
use uv_configuration::{
|
use uv_configuration::{
|
||||||
ConfigSettings, IndexStrategy, KeyringProviderType, PackageNameSpecifier, TargetTriple,
|
ConfigSettings, IndexStrategy, KeyringProviderType, PackageNameSpecifier, TargetTriple,
|
||||||
};
|
};
|
||||||
use uv_interpreter::PythonVersion;
|
|
||||||
use uv_normalize::{ExtraName, PackageName};
|
use uv_normalize::{ExtraName, PackageName};
|
||||||
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
||||||
|
use uv_toolchain::PythonVersion;
|
||||||
|
|
||||||
/// A `pyproject.toml` with an (optional) `[tool.uv]` section.
|
/// A `pyproject.toml` with an (optional) `[tool.uv]` section.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
|
@ -29,7 +29,7 @@ uv-distribution = { workspace = true }
|
||||||
uv-fs = { workspace = true }
|
uv-fs = { workspace = true }
|
||||||
uv-git = { workspace = true }
|
uv-git = { workspace = true }
|
||||||
uv-installer = { workspace = true }
|
uv-installer = { workspace = true }
|
||||||
uv-interpreter = { workspace = true }
|
uv-toolchain = { workspace = true }
|
||||||
uv-normalize = { workspace = true }
|
uv-normalize = { workspace = true }
|
||||||
uv-requirements = { workspace = true }
|
uv-requirements = { workspace = true }
|
||||||
uv-resolver = { workspace = true, features = ["clap"] }
|
uv-resolver = { workspace = true, features = ["clap"] }
|
||||||
|
|
|
@ -11,9 +11,9 @@ use uv_cache::CacheArgs;
|
||||||
use uv_configuration::{
|
use uv_configuration::{
|
||||||
ConfigSettingEntry, IndexStrategy, KeyringProviderType, PackageNameSpecifier, TargetTriple,
|
ConfigSettingEntry, IndexStrategy, KeyringProviderType, PackageNameSpecifier, TargetTriple,
|
||||||
};
|
};
|
||||||
use uv_interpreter::PythonVersion;
|
|
||||||
use uv_normalize::{ExtraName, PackageName};
|
use uv_normalize::{ExtraName, PackageName};
|
||||||
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
use uv_resolver::{AnnotationStyle, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
||||||
|
use uv_toolchain::PythonVersion;
|
||||||
|
|
||||||
use crate::commands::{extra_name_with_clap_error, ListFormat, VersionFormat};
|
use crate::commands::{extra_name_with_clap_error, ListFormat, VersionFormat};
|
||||||
use crate::compat;
|
use crate::compat;
|
||||||
|
|
|
@ -25,8 +25,8 @@ pub(crate) use tool::run::run as run_tool;
|
||||||
use uv_cache::Cache;
|
use uv_cache::Cache;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::compile_tree;
|
use uv_installer::compile_tree;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
pub(crate) use venv::venv;
|
pub(crate) use venv::venv;
|
||||||
pub(crate) use version::version;
|
pub(crate) use version::version;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ use uv_cache::Cache;
|
||||||
use uv_configuration::PreviewMode;
|
use uv_configuration::PreviewMode;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::{SitePackages, SitePackagesDiagnostic};
|
use uv_installer::{SitePackages, SitePackagesDiagnostic};
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
|
|
||||||
use crate::commands::{elapsed, ExitStatus};
|
use crate::commands::{elapsed, ExitStatus};
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
|
@ -31,10 +31,6 @@ use uv_dispatch::BuildDispatch;
|
||||||
use uv_distribution::DistributionDatabase;
|
use uv_distribution::DistributionDatabase;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::PythonVersion;
|
|
||||||
use uv_interpreter::{
|
|
||||||
find_best_interpreter, InterpreterRequest, PythonEnvironment, SystemPython, VersionRequest,
|
|
||||||
};
|
|
||||||
use uv_normalize::{ExtraName, PackageName};
|
use uv_normalize::{ExtraName, PackageName};
|
||||||
use uv_requirements::{
|
use uv_requirements::{
|
||||||
upgrade::read_requirements_txt, LookaheadResolver, NamedRequirementsResolver,
|
upgrade::read_requirements_txt, LookaheadResolver, NamedRequirementsResolver,
|
||||||
|
@ -45,6 +41,10 @@ use uv_resolver::{
|
||||||
InMemoryIndex, Manifest, OptionsBuilder, PreReleaseMode, PythonRequirement, ResolutionMode,
|
InMemoryIndex, Manifest, OptionsBuilder, PreReleaseMode, PythonRequirement, ResolutionMode,
|
||||||
Resolver,
|
Resolver,
|
||||||
};
|
};
|
||||||
|
use uv_toolchain::{
|
||||||
|
find_best_interpreter, InterpreterRequest, PythonEnvironment, PythonVersion, SystemPython,
|
||||||
|
VersionRequest,
|
||||||
|
};
|
||||||
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ use uv_cache::Cache;
|
||||||
use uv_configuration::PreviewMode;
|
use uv_configuration::PreviewMode;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::SitePackages;
|
use uv_installer::SitePackages;
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
|
|
||||||
use crate::commands::ExitStatus;
|
use crate::commands::ExitStatus;
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
|
@ -22,12 +22,12 @@ use uv_dispatch::BuildDispatch;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_installer::{SatisfiesResult, SitePackages};
|
use uv_installer::{SatisfiesResult, SitePackages};
|
||||||
use uv_interpreter::{Prefix, PythonEnvironment, PythonVersion, SystemPython, Target};
|
|
||||||
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
||||||
use uv_resolver::{
|
use uv_resolver::{
|
||||||
DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode,
|
DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode,
|
||||||
ResolutionMode,
|
ResolutionMode,
|
||||||
};
|
};
|
||||||
|
use uv_toolchain::{Prefix, PythonEnvironment, PythonVersion, SystemPython, Target};
|
||||||
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
||||||
|
|
||||||
use crate::commands::pip::operations;
|
use crate::commands::pip::operations;
|
||||||
|
|
|
@ -13,8 +13,8 @@ use uv_cache::Cache;
|
||||||
use uv_configuration::PreviewMode;
|
use uv_configuration::PreviewMode;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::SitePackages;
|
use uv_installer::SitePackages;
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
|
|
||||||
use crate::commands::ExitStatus;
|
use crate::commands::ExitStatus;
|
||||||
use crate::commands::ListFormat;
|
use crate::commands::ListFormat;
|
||||||
|
|
|
@ -28,7 +28,6 @@ use uv_dispatch::BuildDispatch;
|
||||||
use uv_distribution::DistributionDatabase;
|
use uv_distribution::DistributionDatabase;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::{Downloader, Plan, Planner, SitePackages};
|
use uv_installer::{Downloader, Plan, Planner, SitePackages};
|
||||||
use uv_interpreter::{Interpreter, PythonEnvironment};
|
|
||||||
use uv_normalize::{GroupName, PackageName};
|
use uv_normalize::{GroupName, PackageName};
|
||||||
use uv_requirements::{
|
use uv_requirements::{
|
||||||
LookaheadResolver, NamedRequirementsResolver, RequirementsSource, RequirementsSpecification,
|
LookaheadResolver, NamedRequirementsResolver, RequirementsSource, RequirementsSpecification,
|
||||||
|
@ -38,6 +37,7 @@ use uv_resolver::{
|
||||||
DependencyMode, Exclusions, FlatIndex, InMemoryIndex, Manifest, Options, Preference,
|
DependencyMode, Exclusions, FlatIndex, InMemoryIndex, Manifest, Options, Preference,
|
||||||
PythonRequirement, RequiresPython, ResolutionGraph, Resolver,
|
PythonRequirement, RequiresPython, ResolutionGraph, Resolver,
|
||||||
};
|
};
|
||||||
|
use uv_toolchain::{Interpreter, PythonEnvironment};
|
||||||
use uv_types::{HashStrategy, InFlight, InstalledPackagesProvider};
|
use uv_types::{HashStrategy, InFlight, InstalledPackagesProvider};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ use uv_cache::Cache;
|
||||||
use uv_configuration::PreviewMode;
|
use uv_configuration::PreviewMode;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_installer::SitePackages;
|
use uv_installer::SitePackages;
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
|
|
||||||
use crate::commands::ExitStatus;
|
use crate::commands::ExitStatus;
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
|
@ -21,12 +21,12 @@ use uv_dispatch::BuildDispatch;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_installer::SitePackages;
|
use uv_installer::SitePackages;
|
||||||
use uv_interpreter::{Prefix, PythonEnvironment, PythonVersion, SystemPython, Target};
|
|
||||||
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
||||||
use uv_resolver::{
|
use uv_resolver::{
|
||||||
DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode,
|
DependencyMode, ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder, PreReleaseMode,
|
||||||
ResolutionMode,
|
ResolutionMode,
|
||||||
};
|
};
|
||||||
|
use uv_toolchain::{Prefix, PythonEnvironment, PythonVersion, SystemPython, Target};
|
||||||
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
||||||
|
|
||||||
use crate::commands::pip::operations;
|
use crate::commands::pip::operations;
|
||||||
|
|
|
@ -13,8 +13,8 @@ use uv_cache::Cache;
|
||||||
use uv_client::{BaseClientBuilder, Connectivity};
|
use uv_client::{BaseClientBuilder, Connectivity};
|
||||||
use uv_configuration::{KeyringProviderType, PreviewMode};
|
use uv_configuration::{KeyringProviderType, PreviewMode};
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_interpreter::{Prefix, PythonEnvironment, SystemPython, Target};
|
|
||||||
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
||||||
|
use uv_toolchain::{Prefix, PythonEnvironment, SystemPython, Target};
|
||||||
|
|
||||||
use crate::commands::{elapsed, ExitStatus};
|
use crate::commands::{elapsed, ExitStatus};
|
||||||
use crate::printer::Printer;
|
use crate::printer::Printer;
|
||||||
|
|
|
@ -11,10 +11,10 @@ use uv_configuration::{
|
||||||
use uv_dispatch::BuildDispatch;
|
use uv_dispatch::BuildDispatch;
|
||||||
use uv_distribution::{Workspace, DEV_DEPENDENCIES};
|
use uv_distribution::{Workspace, DEV_DEPENDENCIES};
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
use uv_requirements::upgrade::{read_lockfile, LockedRequirements};
|
use uv_requirements::upgrade::{read_lockfile, LockedRequirements};
|
||||||
use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex, Lock, OptionsBuilder, RequiresPython};
|
use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex, Lock, OptionsBuilder, RequiresPython};
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, EmptyInstalledPackages, HashStrategy, InFlight};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ use uv_distribution::Workspace;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_installer::{SatisfiesResult, SitePackages};
|
use uv_installer::{SatisfiesResult, SitePackages};
|
||||||
use uv_interpreter::{find_default_interpreter, PythonEnvironment};
|
|
||||||
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
use uv_requirements::{RequirementsSource, RequirementsSpecification};
|
||||||
use uv_resolver::{FlatIndex, InMemoryIndex, Options, RequiresPython};
|
use uv_resolver::{FlatIndex, InMemoryIndex, Options, RequiresPython};
|
||||||
|
use uv_toolchain::{find_default_interpreter, PythonEnvironment};
|
||||||
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
||||||
|
|
||||||
use crate::commands::pip;
|
use crate::commands::pip;
|
||||||
|
@ -37,7 +37,7 @@ pub(crate) enum ProjectError {
|
||||||
PythonIncompatibility(Version, RequiresPython),
|
PythonIncompatibility(Version, RequiresPython),
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Interpreter(#[from] uv_interpreter::Error),
|
Interpreter(#[from] uv_toolchain::Error),
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Virtualenv(#[from] uv_virtualenv::Error),
|
Virtualenv(#[from] uv_virtualenv::Error),
|
||||||
|
@ -80,11 +80,11 @@ pub(crate) fn init_environment(
|
||||||
// TODO(charlie): If the environment isn't compatible with `--python`, recreate it.
|
// TODO(charlie): If the environment isn't compatible with `--python`, recreate it.
|
||||||
match PythonEnvironment::from_root(&venv, cache) {
|
match PythonEnvironment::from_root(&venv, cache) {
|
||||||
Ok(venv) => Ok(venv),
|
Ok(venv) => Ok(venv),
|
||||||
Err(uv_interpreter::Error::NotFound(_)) => {
|
Err(uv_toolchain::Error::NotFound(_)) => {
|
||||||
// TODO(charlie): Respect `--python`; if unset, respect `Requires-Python`.
|
// TODO(charlie): Respect `--python`; if unset, respect `Requires-Python`.
|
||||||
let interpreter = find_default_interpreter(preview, cache)
|
let interpreter = find_default_interpreter(preview, cache)
|
||||||
.map_err(uv_interpreter::Error::from)?
|
.map_err(uv_toolchain::Error::from)?
|
||||||
.map_err(uv_interpreter::Error::from)?
|
.map_err(uv_toolchain::Error::from)?
|
||||||
.into_interpreter();
|
.into_interpreter();
|
||||||
|
|
||||||
writeln!(
|
writeln!(
|
||||||
|
|
|
@ -12,10 +12,10 @@ use uv_cache::Cache;
|
||||||
use uv_client::Connectivity;
|
use uv_client::Connectivity;
|
||||||
use uv_configuration::{ExtrasSpecification, PreviewMode, Upgrade};
|
use uv_configuration::{ExtrasSpecification, PreviewMode, Upgrade};
|
||||||
use uv_distribution::{ProjectWorkspace, Workspace};
|
use uv_distribution::{ProjectWorkspace, Workspace};
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
use uv_requirements::RequirementsSource;
|
use uv_requirements::RequirementsSource;
|
||||||
use uv_resolver::ExcludeNewer;
|
use uv_resolver::ExcludeNewer;
|
||||||
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
use crate::commands::{project, ExitStatus};
|
use crate::commands::{project, ExitStatus};
|
||||||
|
|
|
@ -12,8 +12,8 @@ use uv_dispatch::BuildDispatch;
|
||||||
use uv_distribution::{ProjectWorkspace, DEV_DEPENDENCIES};
|
use uv_distribution::{ProjectWorkspace, DEV_DEPENDENCIES};
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_installer::SitePackages;
|
use uv_installer::SitePackages;
|
||||||
use uv_interpreter::PythonEnvironment;
|
|
||||||
use uv_resolver::{FlatIndex, InMemoryIndex, Lock};
|
use uv_resolver::{FlatIndex, InMemoryIndex, Lock};
|
||||||
|
use uv_toolchain::PythonEnvironment;
|
||||||
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
use uv_types::{BuildIsolation, HashStrategy, InFlight};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ use tracing::debug;
|
||||||
use uv_cache::Cache;
|
use uv_cache::Cache;
|
||||||
use uv_client::Connectivity;
|
use uv_client::Connectivity;
|
||||||
use uv_configuration::PreviewMode;
|
use uv_configuration::PreviewMode;
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
|
||||||
use uv_requirements::RequirementsSource;
|
use uv_requirements::RequirementsSource;
|
||||||
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
use uv_warnings::warn_user;
|
use uv_warnings::warn_user;
|
||||||
|
|
||||||
use crate::commands::project::update_environment;
|
use crate::commands::project::update_environment;
|
||||||
|
|
|
@ -20,8 +20,8 @@ use uv_configuration::{ConfigSettings, IndexStrategy, NoBinary, NoBuild, SetupPy
|
||||||
use uv_dispatch::BuildDispatch;
|
use uv_dispatch::BuildDispatch;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_git::GitResolver;
|
use uv_git::GitResolver;
|
||||||
use uv_interpreter::{PythonEnvironment, SystemPython};
|
|
||||||
use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder};
|
use uv_resolver::{ExcludeNewer, FlatIndex, InMemoryIndex, OptionsBuilder};
|
||||||
|
use uv_toolchain::{PythonEnvironment, SystemPython};
|
||||||
use uv_types::{BuildContext, BuildIsolation, HashStrategy, InFlight};
|
use uv_types::{BuildContext, BuildIsolation, HashStrategy, InFlight};
|
||||||
|
|
||||||
use crate::commands::{pip, ExitStatus};
|
use crate::commands::{pip, ExitStatus};
|
||||||
|
|
|
@ -15,9 +15,9 @@ use uv_configuration::{
|
||||||
Concurrency, ConfigSettings, ExtrasSpecification, IndexStrategy, KeyringProviderType, NoBinary,
|
Concurrency, ConfigSettings, ExtrasSpecification, IndexStrategy, KeyringProviderType, NoBinary,
|
||||||
NoBuild, PreviewMode, Reinstall, SetupPyStrategy, TargetTriple, Upgrade,
|
NoBuild, PreviewMode, Reinstall, SetupPyStrategy, TargetTriple, Upgrade,
|
||||||
};
|
};
|
||||||
use uv_interpreter::{Prefix, PythonVersion, Target};
|
|
||||||
use uv_normalize::PackageName;
|
use uv_normalize::PackageName;
|
||||||
use uv_resolver::{AnnotationStyle, DependencyMode, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
use uv_resolver::{AnnotationStyle, DependencyMode, ExcludeNewer, PreReleaseMode, ResolutionMode};
|
||||||
|
use uv_toolchain::{Prefix, PythonVersion, Target};
|
||||||
use uv_workspace::{Combine, PipOptions, Workspace};
|
use uv_workspace::{Combine, PipOptions, Workspace};
|
||||||
|
|
||||||
use crate::cli::{
|
use crate::cli::{
|
||||||
|
|
|
@ -17,8 +17,8 @@ use uv_configuration::PreviewMode;
|
||||||
|
|
||||||
use uv_cache::Cache;
|
use uv_cache::Cache;
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_interpreter::managed::InstalledToolchains;
|
use uv_toolchain::managed::InstalledToolchains;
|
||||||
use uv_interpreter::{
|
use uv_toolchain::{
|
||||||
find_interpreter, InterpreterRequest, PythonVersion, SourceSelector, VersionRequest,
|
find_interpreter, InterpreterRequest, PythonVersion, SourceSelector, VersionRequest,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ pub fn create_venv<Parent: assert_fs::prelude::PathChild + AsRef<std::path::Path
|
||||||
.expect("Tests are run on a supported platform")
|
.expect("Tests are run on a supported platform")
|
||||||
.next()
|
.next()
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(uv_interpreter::managed::Toolchain::executable)
|
.map(uv_toolchain::managed::Toolchain::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 toolchain versions
|
||||||
// We hack this into a `PathBuf` to satisfy the compiler but it's just a string
|
// We hack this into a `PathBuf` to satisfy the compiler but it's just a string
|
||||||
|
@ -485,7 +485,7 @@ pub fn python_path_with_versions(
|
||||||
&request,
|
&request,
|
||||||
// Without required, we could pick the current venv here and the test fails
|
// Without required, we could pick the current venv here and the test fails
|
||||||
// because the venv subcommand requires a system interpreter.
|
// because the venv subcommand requires a system interpreter.
|
||||||
uv_interpreter::SystemPython::Required,
|
uv_toolchain::SystemPython::Required,
|
||||||
&sources,
|
&sources,
|
||||||
&cache,
|
&cache,
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,7 +9,7 @@ use assert_fs::fixture::ChildPath;
|
||||||
use assert_fs::prelude::*;
|
use assert_fs::prelude::*;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use uv_fs::Simplified;
|
use uv_fs::Simplified;
|
||||||
use uv_interpreter::PythonVersion;
|
use uv_toolchain::PythonVersion;
|
||||||
|
|
||||||
use crate::common::{get_bin, python_path_with_versions, uv_snapshot, TestContext, EXCLUDE_NEWER};
|
use crate::common::{get_bin, python_path_with_versions, uv_snapshot, TestContext, EXCLUDE_NEWER};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue