mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-03 13:14:41 +00:00
Support Android platform tags (#15646)
## Summary This implements the Android part of https://github.com/astral-sh/uv/issues/8029 FYI: @freakboy3742 @mhsmith <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Create a venv with uv and run `cargo run pip install --python-platform aarch64-linux-android pybase64`. Then the Android binary of pybase64 should be installed inside the venv.
This commit is contained in:
parent
a94f7d0847
commit
d178e45368
9 changed files with 283 additions and 13 deletions
|
|
@ -1448,6 +1448,9 @@ pub struct PipCompileArgs {
|
||||||
///
|
///
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub python_platform: Option<TargetTriple>,
|
pub python_platform: Option<TargetTriple>,
|
||||||
|
|
||||||
|
|
@ -1775,6 +1778,9 @@ pub struct PipSyncArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -2078,6 +2084,9 @@ pub struct PipInstallArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -2400,6 +2409,9 @@ pub struct PipCheckArgs {
|
||||||
///
|
///
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub python_platform: Option<TargetTriple>,
|
pub python_platform: Option<TargetTriple>,
|
||||||
}
|
}
|
||||||
|
|
@ -3326,6 +3338,9 @@ pub struct RunArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -3603,6 +3618,9 @@ pub struct SyncArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -4626,6 +4644,9 @@ pub struct ToolRunArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -4748,6 +4769,9 @@ pub struct ToolInstallArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
@ -4845,6 +4869,9 @@ pub struct ToolUpgradeArgs {
|
||||||
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
/// When targeting macOS (Darwin), the default minimum version is `12.0`. Use
|
||||||
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
/// `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `13.0`.
|
||||||
///
|
///
|
||||||
|
/// When targeting Android, the default minimum Android API level is `24`. Use
|
||||||
|
/// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`.
|
||||||
|
///
|
||||||
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
/// WARNING: When specified, uv will select wheels that are compatible with the _target_
|
||||||
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
/// platform; as a result, the installed distributions may not be compatible with the _current_
|
||||||
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
/// platform. Conversely, any distributions that are built from source may be incompatible with
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,22 @@ pub enum TargetTriple {
|
||||||
#[serde(alias = "aarch64-manylinux240")]
|
#[serde(alias = "aarch64-manylinux240")]
|
||||||
Aarch64Manylinux240,
|
Aarch64Manylinux240,
|
||||||
|
|
||||||
|
/// An ARM64 Android target.
|
||||||
|
///
|
||||||
|
/// By default uses Android API level 24, but respects
|
||||||
|
/// the `ANDROID_API_LEVEL` environment variable if set.
|
||||||
|
#[cfg_attr(feature = "clap", value(name = "aarch64-linux-android"))]
|
||||||
|
#[serde(rename = "aarch64-linux-android")]
|
||||||
|
Aarch64LinuxAndroid,
|
||||||
|
|
||||||
|
/// An `x86_64` Android target.
|
||||||
|
///
|
||||||
|
/// By default uses Android API level 24, but respects
|
||||||
|
/// the `ANDROID_API_LEVEL` environment variable if set.
|
||||||
|
#[cfg_attr(feature = "clap", value(name = "x86_64-linux-android"))]
|
||||||
|
#[serde(rename = "x86_64-linux-android")]
|
||||||
|
X8664LinuxAndroid,
|
||||||
|
|
||||||
/// A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.
|
/// A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.
|
||||||
#[cfg_attr(feature = "clap", value(name = "wasm32-pyodide2024"))]
|
#[cfg_attr(feature = "clap", value(name = "wasm32-pyodide2024"))]
|
||||||
Wasm32Pyodide2024,
|
Wasm32Pyodide2024,
|
||||||
|
|
@ -480,6 +496,20 @@ impl TargetTriple {
|
||||||
},
|
},
|
||||||
Arch::Wasm32,
|
Arch::Wasm32,
|
||||||
),
|
),
|
||||||
|
Self::Aarch64LinuxAndroid => {
|
||||||
|
let api_level = android_api_level().map_or(24, |api_level| {
|
||||||
|
debug!("Found Android API level: {}", api_level);
|
||||||
|
api_level
|
||||||
|
});
|
||||||
|
Platform::new(Os::Android { api_level }, Arch::Aarch64)
|
||||||
|
}
|
||||||
|
Self::X8664LinuxAndroid => {
|
||||||
|
let api_level = android_api_level().map_or(24, |api_level| {
|
||||||
|
debug!("Found Android API level: {}", api_level);
|
||||||
|
api_level
|
||||||
|
});
|
||||||
|
Platform::new(Os::Android { api_level }, Arch::X86_64)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -522,6 +552,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "aarch64",
|
Self::Aarch64Manylinux238 => "aarch64",
|
||||||
Self::Aarch64Manylinux239 => "aarch64",
|
Self::Aarch64Manylinux239 => "aarch64",
|
||||||
Self::Aarch64Manylinux240 => "aarch64",
|
Self::Aarch64Manylinux240 => "aarch64",
|
||||||
|
Self::Aarch64LinuxAndroid => "aarch64",
|
||||||
|
Self::X8664LinuxAndroid => "x86_64",
|
||||||
Self::Wasm32Pyodide2024 => "wasm32",
|
Self::Wasm32Pyodide2024 => "wasm32",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -565,6 +597,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "Linux",
|
Self::Aarch64Manylinux238 => "Linux",
|
||||||
Self::Aarch64Manylinux239 => "Linux",
|
Self::Aarch64Manylinux239 => "Linux",
|
||||||
Self::Aarch64Manylinux240 => "Linux",
|
Self::Aarch64Manylinux240 => "Linux",
|
||||||
|
Self::Aarch64LinuxAndroid => "Android",
|
||||||
|
Self::X8664LinuxAndroid => "Android",
|
||||||
Self::Wasm32Pyodide2024 => "Emscripten",
|
Self::Wasm32Pyodide2024 => "Emscripten",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -608,6 +642,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "",
|
Self::Aarch64Manylinux238 => "",
|
||||||
Self::Aarch64Manylinux239 => "",
|
Self::Aarch64Manylinux239 => "",
|
||||||
Self::Aarch64Manylinux240 => "",
|
Self::Aarch64Manylinux240 => "",
|
||||||
|
Self::Aarch64LinuxAndroid => "",
|
||||||
|
Self::X8664LinuxAndroid => "",
|
||||||
// This is the value Emscripten gives for its version:
|
// This is the value Emscripten gives for its version:
|
||||||
// https://github.com/emscripten-core/emscripten/blob/4.0.8/system/lib/libc/emscripten_syscall_stubs.c#L63
|
// https://github.com/emscripten-core/emscripten/blob/4.0.8/system/lib/libc/emscripten_syscall_stubs.c#L63
|
||||||
// It doesn't really seem to mean anything? But for completeness we include it here.
|
// It doesn't really seem to mean anything? But for completeness we include it here.
|
||||||
|
|
@ -654,6 +690,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "",
|
Self::Aarch64Manylinux238 => "",
|
||||||
Self::Aarch64Manylinux239 => "",
|
Self::Aarch64Manylinux239 => "",
|
||||||
Self::Aarch64Manylinux240 => "",
|
Self::Aarch64Manylinux240 => "",
|
||||||
|
Self::Aarch64LinuxAndroid => "",
|
||||||
|
Self::X8664LinuxAndroid => "",
|
||||||
// This is the Emscripten compiler version for Pyodide 2024.
|
// This is the Emscripten compiler version for Pyodide 2024.
|
||||||
// See https://pyodide.org/en/stable/development/abi.html#pyodide-2024-0
|
// See https://pyodide.org/en/stable/development/abi.html#pyodide-2024-0
|
||||||
Self::Wasm32Pyodide2024 => "3.1.58",
|
Self::Wasm32Pyodide2024 => "3.1.58",
|
||||||
|
|
@ -699,6 +737,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "posix",
|
Self::Aarch64Manylinux238 => "posix",
|
||||||
Self::Aarch64Manylinux239 => "posix",
|
Self::Aarch64Manylinux239 => "posix",
|
||||||
Self::Aarch64Manylinux240 => "posix",
|
Self::Aarch64Manylinux240 => "posix",
|
||||||
|
Self::Aarch64LinuxAndroid => "posix",
|
||||||
|
Self::X8664LinuxAndroid => "posix",
|
||||||
Self::Wasm32Pyodide2024 => "posix",
|
Self::Wasm32Pyodide2024 => "posix",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -742,6 +782,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => "linux",
|
Self::Aarch64Manylinux238 => "linux",
|
||||||
Self::Aarch64Manylinux239 => "linux",
|
Self::Aarch64Manylinux239 => "linux",
|
||||||
Self::Aarch64Manylinux240 => "linux",
|
Self::Aarch64Manylinux240 => "linux",
|
||||||
|
Self::Aarch64LinuxAndroid => "android",
|
||||||
|
Self::X8664LinuxAndroid => "android",
|
||||||
Self::Wasm32Pyodide2024 => "emscripten",
|
Self::Wasm32Pyodide2024 => "emscripten",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -785,6 +827,8 @@ impl TargetTriple {
|
||||||
Self::Aarch64Manylinux238 => true,
|
Self::Aarch64Manylinux238 => true,
|
||||||
Self::Aarch64Manylinux239 => true,
|
Self::Aarch64Manylinux239 => true,
|
||||||
Self::Aarch64Manylinux240 => true,
|
Self::Aarch64Manylinux240 => true,
|
||||||
|
Self::Aarch64LinuxAndroid => false,
|
||||||
|
Self::X8664LinuxAndroid => false,
|
||||||
Self::Wasm32Pyodide2024 => false,
|
Self::Wasm32Pyodide2024 => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -818,3 +862,13 @@ fn macos_deployment_target() -> Option<(u16, u16)> {
|
||||||
|
|
||||||
Some((major, minor))
|
Some((major, minor))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the Android API level as parsed from the environment.
|
||||||
|
fn android_api_level() -> Option<u16> {
|
||||||
|
let api_level_str = std::env::var(EnvVars::ANDROID_API_LEVEL).ok()?;
|
||||||
|
|
||||||
|
// Parse the api level.
|
||||||
|
let api_level = api_level_str.parse::<u16>().ok()?;
|
||||||
|
|
||||||
|
Some(api_level)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ pub enum PlatformError {
|
||||||
IOError(#[from] io::Error),
|
IOError(#[from] io::Error),
|
||||||
#[error("Failed to detect the operating system version: {0}")]
|
#[error("Failed to detect the operating system version: {0}")]
|
||||||
OsVersionDetectionError(String),
|
OsVersionDetectionError(String),
|
||||||
|
#[error("Failed to detect the arch: {0}")]
|
||||||
|
ArchDetectionError(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
|
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ use std::str::FromStr;
|
||||||
|
|
||||||
use uv_small_str::SmallString;
|
use uv_small_str::SmallString;
|
||||||
|
|
||||||
|
use crate::tags::AndroidAbi;
|
||||||
use crate::{Arch, BinaryFormat};
|
use crate::{Arch, BinaryFormat};
|
||||||
|
|
||||||
/// A tag to represent the platform compatibility of a Python distribution.
|
/// A tag to represent the platform compatibility of a Python distribution.
|
||||||
|
|
@ -56,7 +57,7 @@ pub enum PlatformTag {
|
||||||
/// Ex) `win_ia64`
|
/// Ex) `win_ia64`
|
||||||
WinIa64,
|
WinIa64,
|
||||||
/// Ex) `android_21_x86_64`
|
/// Ex) `android_21_x86_64`
|
||||||
Android { api_level: u16, arch: Arch },
|
Android { api_level: u16, abi: AndroidAbi },
|
||||||
/// Ex) `freebsd_12_x86_64`
|
/// Ex) `freebsd_12_x86_64`
|
||||||
FreeBsd { release_arch: SmallString },
|
FreeBsd { release_arch: SmallString },
|
||||||
/// Ex) `netbsd_9_x86_64`
|
/// Ex) `netbsd_9_x86_64`
|
||||||
|
|
@ -179,7 +180,7 @@ impl PlatformTag {
|
||||||
..
|
..
|
||||||
} | Self::WinArm64
|
} | Self::WinArm64
|
||||||
| Self::Android {
|
| Self::Android {
|
||||||
arch: Arch::Aarch64,
|
abi: AndroidAbi::Arm64V8a,
|
||||||
..
|
..
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -267,7 +268,7 @@ impl std::fmt::Display for PlatformTag {
|
||||||
Self::WinAmd64 => write!(f, "win_amd64"),
|
Self::WinAmd64 => write!(f, "win_amd64"),
|
||||||
Self::WinArm64 => write!(f, "win_arm64"),
|
Self::WinArm64 => write!(f, "win_arm64"),
|
||||||
Self::WinIa64 => write!(f, "win_ia64"),
|
Self::WinIa64 => write!(f, "win_ia64"),
|
||||||
Self::Android { api_level, arch } => write!(f, "android_{api_level}_{arch}"),
|
Self::Android { api_level, abi } => write!(f, "android_{api_level}_{abi}"),
|
||||||
Self::FreeBsd { release_arch } => write!(f, "freebsd_{release_arch}"),
|
Self::FreeBsd { release_arch } => write!(f, "freebsd_{release_arch}"),
|
||||||
Self::NetBsd { release_arch } => write!(f, "netbsd_{release_arch}"),
|
Self::NetBsd { release_arch } => write!(f, "netbsd_{release_arch}"),
|
||||||
Self::OpenBsd { release_arch } => write!(f, "openbsd_{release_arch}"),
|
Self::OpenBsd { release_arch } => write!(f, "openbsd_{release_arch}"),
|
||||||
|
|
@ -489,7 +490,7 @@ impl FromStr for PlatformTag {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(rest) = s.strip_prefix("android_") {
|
if let Some(rest) = s.strip_prefix("android_") {
|
||||||
// Ex) android_21_arm64
|
// Ex) android_21_arm64_v8a
|
||||||
let underscore = memchr::memchr(b'_', rest.as_bytes()).ok_or_else(|| {
|
let underscore = memchr::memchr(b'_', rest.as_bytes()).ok_or_else(|| {
|
||||||
ParsePlatformTagError::InvalidFormat {
|
ParsePlatformTagError::InvalidFormat {
|
||||||
platform: "android",
|
platform: "android",
|
||||||
|
|
@ -505,22 +506,22 @@ impl FromStr for PlatformTag {
|
||||||
tag: s.to_string(),
|
tag: s.to_string(),
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let arch_str = &rest[underscore + 1..];
|
let abi_str = &rest[underscore + 1..];
|
||||||
if arch_str.is_empty() {
|
if abi_str.is_empty() {
|
||||||
return Err(ParsePlatformTagError::InvalidFormat {
|
return Err(ParsePlatformTagError::InvalidFormat {
|
||||||
platform: "android",
|
platform: "android",
|
||||||
tag: s.to_string(),
|
tag: s.to_string(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let arch = arch_str
|
let abi = abi_str
|
||||||
.parse()
|
.parse()
|
||||||
.map_err(|_| ParsePlatformTagError::InvalidArch {
|
.map_err(|_| ParsePlatformTagError::InvalidArch {
|
||||||
platform: "android",
|
platform: "android",
|
||||||
tag: s.to_string(),
|
tag: s.to_string(),
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
return Ok(Self::Android { api_level, arch });
|
return Ok(Self::Android { api_level, abi });
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(rest) = s.strip_prefix("freebsd_") {
|
if let Some(rest) = s.strip_prefix("freebsd_") {
|
||||||
|
|
@ -684,6 +685,7 @@ mod tests {
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use crate::platform_tag::{ParsePlatformTagError, PlatformTag};
|
use crate::platform_tag::{ParsePlatformTagError, PlatformTag};
|
||||||
|
use crate::tags::AndroidAbi;
|
||||||
use crate::{Arch, BinaryFormat};
|
use crate::{Arch, BinaryFormat};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -964,6 +966,35 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn android_platform() {
|
||||||
|
let tag = PlatformTag::Android {
|
||||||
|
api_level: 21,
|
||||||
|
abi: AndroidAbi::Arm64V8a,
|
||||||
|
};
|
||||||
|
assert_eq!(
|
||||||
|
PlatformTag::from_str("android_21_arm64_v8a").as_ref(),
|
||||||
|
Ok(&tag)
|
||||||
|
);
|
||||||
|
assert_eq!(tag.to_string(), "android_21_arm64_v8a");
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
PlatformTag::from_str("android_X_arm64_v8a"),
|
||||||
|
Err(ParsePlatformTagError::InvalidApiLevel {
|
||||||
|
platform: "android",
|
||||||
|
tag: "android_X_arm64_v8a".to_string()
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
PlatformTag::from_str("android_21_aarch64"),
|
||||||
|
Err(ParsePlatformTagError::InvalidArch {
|
||||||
|
platform: "android",
|
||||||
|
tag: "android_21_aarch64".to_string()
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn unknown_platform() {
|
fn unknown_platform() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
|
||||||
|
|
@ -611,11 +611,21 @@ fn compatible_tags(platform: &Platform) -> Result<Vec<PlatformTag>, PlatformErro
|
||||||
release_arch: SmallString::from(release_arch),
|
release_arch: SmallString::from(release_arch),
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
(Os::Android { api_level }, _) => {
|
(Os::Android { api_level }, arch) => {
|
||||||
vec![PlatformTag::Android {
|
// Source: https://github.com/pypa/packaging/blob/e5470c1854e352f68fa3f83df9cbb0af59558c49/src/packaging/tags.py#L541
|
||||||
api_level: *api_level,
|
let mut platform_tags = vec![];
|
||||||
arch,
|
|
||||||
}]
|
// 16 is the minimum API level known to have enough features to support CPython
|
||||||
|
// without major patching. Yield every API level from the maximum down to the
|
||||||
|
// minimum, inclusive.
|
||||||
|
for ver in (16..=*api_level).rev() {
|
||||||
|
platform_tags.push(PlatformTag::Android {
|
||||||
|
api_level: ver,
|
||||||
|
abi: AndroidAbi::from_arch(arch).map_err(PlatformError::ArchDetectionError)?,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
platform_tags
|
||||||
}
|
}
|
||||||
(Os::Pyodide { major, minor }, Arch::Wasm32) => {
|
(Os::Pyodide { major, minor }, Arch::Wasm32) => {
|
||||||
vec![PlatformTag::Pyodide {
|
vec![PlatformTag::Pyodide {
|
||||||
|
|
@ -759,6 +769,71 @@ impl BinaryFormat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(
|
||||||
|
Debug,
|
||||||
|
Copy,
|
||||||
|
Clone,
|
||||||
|
Eq,
|
||||||
|
PartialEq,
|
||||||
|
Ord,
|
||||||
|
PartialOrd,
|
||||||
|
Hash,
|
||||||
|
rkyv::Archive,
|
||||||
|
rkyv::Deserialize,
|
||||||
|
rkyv::Serialize,
|
||||||
|
)]
|
||||||
|
#[rkyv(derive(Debug))]
|
||||||
|
pub enum AndroidAbi {
|
||||||
|
// Source: https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#android
|
||||||
|
ArmeabiV7a,
|
||||||
|
Arm64V8a,
|
||||||
|
X86,
|
||||||
|
X86_64,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for AndroidAbi {
|
||||||
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{}", self.name())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromStr for AndroidAbi {
|
||||||
|
type Err = String;
|
||||||
|
|
||||||
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
|
match s {
|
||||||
|
"armeabi_v7a" => Ok(Self::ArmeabiV7a),
|
||||||
|
"arm64_v8a" => Ok(Self::Arm64V8a),
|
||||||
|
"x86" => Ok(Self::X86),
|
||||||
|
"x86_64" => Ok(Self::X86_64),
|
||||||
|
_ => Err(format!("Invalid Android arch format: {s}")),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AndroidAbi {
|
||||||
|
/// Determine the appropriate Android arch.
|
||||||
|
pub fn from_arch(arch: Arch) -> Result<Self, String> {
|
||||||
|
match arch {
|
||||||
|
Arch::Aarch64 => Ok(Self::Arm64V8a),
|
||||||
|
Arch::Armv7L => Ok(Self::ArmeabiV7a),
|
||||||
|
Arch::X86 => Ok(Self::X86),
|
||||||
|
Arch::X86_64 => Ok(Self::X86_64),
|
||||||
|
_ => Err(format!("Invalid Android arch format: {arch}")),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Return the canonical name of the binary format.
|
||||||
|
pub fn name(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::ArmeabiV7a => "armeabi_v7a",
|
||||||
|
Self::Arm64V8a => "arm64_v8a",
|
||||||
|
Self::X86 => "x86",
|
||||||
|
Self::X86_64 => "x86_64",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use insta::{assert_debug_snapshot, assert_snapshot};
|
use insta::{assert_debug_snapshot, assert_snapshot};
|
||||||
|
|
@ -1130,6 +1205,35 @@ mod tests {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_platform_tags_android() {
|
||||||
|
let tags =
|
||||||
|
compatible_tags(&Platform::new(Os::Android { api_level: 14 }, Arch::Aarch64)).unwrap();
|
||||||
|
let tags = tags.iter().map(ToString::to_string).collect::<Vec<_>>();
|
||||||
|
assert_debug_snapshot!(
|
||||||
|
tags,
|
||||||
|
@r###"
|
||||||
|
[]
|
||||||
|
"###
|
||||||
|
);
|
||||||
|
|
||||||
|
let tags =
|
||||||
|
compatible_tags(&Platform::new(Os::Android { api_level: 20 }, Arch::Aarch64)).unwrap();
|
||||||
|
let tags = tags.iter().map(ToString::to_string).collect::<Vec<_>>();
|
||||||
|
assert_debug_snapshot!(
|
||||||
|
tags,
|
||||||
|
@r###"
|
||||||
|
[
|
||||||
|
"android_20_arm64_v8a",
|
||||||
|
"android_19_arm64_v8a",
|
||||||
|
"android_18_arm64_v8a",
|
||||||
|
"android_17_arm64_v8a",
|
||||||
|
"android_16_arm64_v8a",
|
||||||
|
]
|
||||||
|
"###
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// Ensure the tags returned do not include the `manylinux` tags
|
/// Ensure the tags returned do not include the `manylinux` tags
|
||||||
/// when `manylinux_incompatible` is set to `false`.
|
/// when `manylinux_incompatible` is set to `false`.
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
|
|
@ -531,6 +531,12 @@ impl EnvVars {
|
||||||
/// Defaults to `13.0`, the least-recent non-EOL macOS version at time of writing.
|
/// Defaults to `13.0`, the least-recent non-EOL macOS version at time of writing.
|
||||||
pub const MACOSX_DEPLOYMENT_TARGET: &'static str = "MACOSX_DEPLOYMENT_TARGET";
|
pub const MACOSX_DEPLOYMENT_TARGET: &'static str = "MACOSX_DEPLOYMENT_TARGET";
|
||||||
|
|
||||||
|
/// Used with `--python-platform aarch64-linux-android` and related variants to set the
|
||||||
|
/// Android API level. (i.e., the minimum supported Android API level).
|
||||||
|
///
|
||||||
|
/// Defaults to `24`.
|
||||||
|
pub const ANDROID_API_LEVEL: &'static str = "ANDROID_API_LEVEL";
|
||||||
|
|
||||||
/// Disables colored output (takes precedence over `FORCE_COLOR`).
|
/// Disables colored output (takes precedence over `FORCE_COLOR`).
|
||||||
///
|
///
|
||||||
/// See [no-color.org](https://no-color.org).
|
/// See [no-color.org](https://no-color.org).
|
||||||
|
|
|
||||||
|
|
@ -538,6 +538,7 @@ used.</p>
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-run--python-platform"><a href="#uv-run--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-run--python-platform"><a href="#uv-run--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -580,6 +581,8 @@ used.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-run--quiet"><a href="#uv-run--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
</ul></dd><dt id="uv-run--quiet"><a href="#uv-run--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
||||||
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
||||||
|
|
@ -1531,6 +1534,7 @@ environment in the project.</p>
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-sync--python-platform"><a href="#uv-sync--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-sync--python-platform"><a href="#uv-sync--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -1573,6 +1577,8 @@ environment in the project.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-sync--quiet"><a href="#uv-sync--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
</ul></dd><dt id="uv-sync--quiet"><a href="#uv-sync--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
||||||
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
||||||
|
|
@ -2174,6 +2180,8 @@ interpreter. Use <code>--universal</code> to display the tree for all platforms,
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-tree--python-version"><a href="#uv-tree--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version to use when filtering the tree.</p>
|
</ul></dd><dt id="uv-tree--python-version"><a href="#uv-tree--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version to use when filtering the tree.</p>
|
||||||
<p>For example, pass <code>--python-version 3.10</code> to display the dependencies that would be included when installing on Python 3.10.</p>
|
<p>For example, pass <code>--python-version 3.10</code> to display the dependencies that would be included when installing on Python 3.10.</p>
|
||||||
|
|
@ -2457,6 +2465,7 @@ uv tool run [OPTIONS] [COMMAND]
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-run--python-platform"><a href="#uv-tool-run--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-run--python-platform"><a href="#uv-tool-run--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -2499,6 +2508,8 @@ uv tool run [OPTIONS] [COMMAND]
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-tool-run--quiet"><a href="#uv-tool-run--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
</ul></dd><dt id="uv-tool-run--quiet"><a href="#uv-tool-run--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
||||||
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
||||||
|
|
@ -2677,6 +2688,7 @@ uv tool install [OPTIONS] <PACKAGE>
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-install--python-platform"><a href="#uv-tool-install--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-install--python-platform"><a href="#uv-tool-install--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -2719,6 +2731,8 @@ uv tool install [OPTIONS] <PACKAGE>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-tool-install--quiet"><a href="#uv-tool-install--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
</ul></dd><dt id="uv-tool-install--quiet"><a href="#uv-tool-install--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
||||||
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
||||||
|
|
@ -2888,6 +2902,7 @@ Use with <code>--all</code> to apply to all tools.</p>
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-upgrade--python-platform"><a href="#uv-tool-upgrade--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-tool-upgrade--python-platform"><a href="#uv-tool-upgrade--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -2930,6 +2945,8 @@ Use with <code>--all</code> to apply to all tools.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-tool-upgrade--quiet"><a href="#uv-tool-upgrade--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
</ul></dd><dt id="uv-tool-upgrade--quiet"><a href="#uv-tool-upgrade--quiet"><code>--quiet</code></a>, <code>-q</code></dt><dd><p>Use quiet output.</p>
|
||||||
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
<p>Repeating this option, e.g., <code>-qq</code>, will enable a silent mode in which uv will write no output to stdout.</p>
|
||||||
|
|
@ -4128,6 +4145,7 @@ by <code>--python-version</code>.</p>
|
||||||
</dd><dt id="uv-pip-compile--python-platform"><a href="#uv-pip-compile--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be resolved.</p>
|
</dd><dt id="uv-pip-compile--python-platform"><a href="#uv-pip-compile--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be resolved.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>windows</code>: An alias for <code>x86_64-pc-windows-msvc</code>, the default target for Windows</li>
|
<li><code>windows</code>: An alias for <code>x86_64-pc-windows-msvc</code>, the default target for Windows</li>
|
||||||
|
|
@ -4169,6 +4187,8 @@ by <code>--python-version</code>.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-pip-compile--python-version"><a href="#uv-pip-compile--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version to use for resolution.</p>
|
</ul></dd><dt id="uv-pip-compile--python-version"><a href="#uv-pip-compile--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version to use for resolution.</p>
|
||||||
<p>For example, <code>3.8</code> or <code>3.8.17</code>.</p>
|
<p>For example, <code>3.8</code> or <code>3.8.17</code>.</p>
|
||||||
|
|
@ -4399,6 +4419,7 @@ be used with caution, as it can modify the system Python installation.</p>
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-pip-sync--python-platform"><a href="#uv-pip-sync--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-pip-sync--python-platform"><a href="#uv-pip-sync--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -4441,6 +4462,8 @@ be used with caution, as it can modify the system Python installation.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-pip-sync--python-version"><a href="#uv-pip-sync--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The minimum Python version that should be supported by the requirements (e.g., <code>3.7</code> or <code>3.7.9</code>).</p>
|
</ul></dd><dt id="uv-pip-sync--python-version"><a href="#uv-pip-sync--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The minimum Python version that should be supported by the requirements (e.g., <code>3.7</code> or <code>3.7.9</code>).</p>
|
||||||
<p>If a patch version is omitted, the minimum patch version is assumed. For example, <code>3.7</code> is mapped to <code>3.7.0</code>.</p>
|
<p>If a patch version is omitted, the minimum patch version is assumed. For example, <code>3.7</code> is mapped to <code>3.7.0</code>.</p>
|
||||||
|
|
@ -4689,6 +4712,7 @@ should be used with caution, as it can modify the system Python installation.</p
|
||||||
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-pip-install--python-platform"><a href="#uv-pip-install--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
<p>May also be set with the <code>UV_PYTHON</code> environment variable.</p></dd><dt id="uv-pip-install--python-platform"><a href="#uv-pip-install--python-platform"><code>--python-platform</code></a> <i>python-platform</i></dt><dd><p>The platform for which requirements should be installed.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
<p>WARNING: When specified, uv will select wheels that are compatible with the <em>target</em> platform; as a result, the installed distributions may not be compatible with the <em>current</em> platform. Conversely, any distributions that are built from source may be incompatible with the <em>target</em> platform, as they will be built for the <em>current</em> platform. The <code>--python-platform</code> option is intended for advanced use cases.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -4731,6 +4755,8 @@ should be used with caution, as it can modify the system Python installation.</p
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-pip-install--python-version"><a href="#uv-pip-install--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The minimum Python version that should be supported by the requirements (e.g., <code>3.7</code> or <code>3.7.9</code>).</p>
|
</ul></dd><dt id="uv-pip-install--python-version"><a href="#uv-pip-install--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The minimum Python version that should be supported by the requirements (e.g., <code>3.7</code> or <code>3.7.9</code>).</p>
|
||||||
<p>If a patch version is omitted, the minimum patch version is assumed. For example, <code>3.7</code> is mapped to <code>3.7.0</code>.</p>
|
<p>If a patch version is omitted, the minimum patch version is assumed. For example, <code>3.7</code> is mapped to <code>3.7.0</code>.</p>
|
||||||
|
|
@ -5320,6 +5346,7 @@ Python environment if no virtual environment is found.</p>
|
||||||
<p>By default, the installed packages are checked against the platform of the current interpreter.</p>
|
<p>By default, the installed packages are checked against the platform of the current interpreter.</p>
|
||||||
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
<p>Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like <code>x86_64-unknown-linux-gnu</code> or <code>aarch64-apple-darwin</code>.</p>
|
||||||
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
<p>When targeting macOS (Darwin), the default minimum version is <code>12.0</code>. Use <code>MACOSX_DEPLOYMENT_TARGET</code> to specify a different minimum version, e.g., <code>13.0</code>.</p>
|
||||||
|
<p>When targeting Android, the default minimum Android API level is <code>24</code>. Use <code>ANDROID_API_LEVEL</code> to specify a different minimum version, e.g., <code>26</code>.</p>
|
||||||
<p>Possible values:</p>
|
<p>Possible values:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>windows</code>: An alias for <code>x86_64-pc-windows-msvc</code>, the default target for Windows</li>
|
<li><code>windows</code>: An alias for <code>x86_64-pc-windows-msvc</code>, the default target for Windows</li>
|
||||||
|
|
@ -5361,6 +5388,8 @@ Python environment if no virtual environment is found.</p>
|
||||||
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
<li><code>aarch64-manylinux_2_38</code>: An ARM64 target for the <code>manylinux_2_38</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
<li><code>aarch64-manylinux_2_39</code>: An ARM64 target for the <code>manylinux_2_39</code> platform</li>
|
||||||
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
<li><code>aarch64-manylinux_2_40</code>: An ARM64 target for the <code>manylinux_2_40</code> platform</li>
|
||||||
|
<li><code>aarch64-linux-android</code>: An ARM64 Android target</li>
|
||||||
|
<li><code>x86_64-linux-android</code>: An <code>x86_64</code> Android target</li>
|
||||||
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
<li><code>wasm32-pyodide2024</code>: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12</li>
|
||||||
</ul></dd><dt id="uv-pip-check--python-version"><a href="#uv-pip-check--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version against which packages should be checked.</p>
|
</ul></dd><dt id="uv-pip-check--python-version"><a href="#uv-pip-check--python-version"><code>--python-version</code></a> <i>python-version</i></dt><dd><p>The Python version against which packages should be checked.</p>
|
||||||
<p>By default, the installed packages are checked against the version of the current interpreter.</p>
|
<p>By default, the installed packages are checked against the version of the current interpreter.</p>
|
||||||
|
|
|
||||||
|
|
@ -565,6 +565,13 @@ Used for trusted publishing via `uv publish`. Contains the oidc token url.
|
||||||
|
|
||||||
General proxy for all network requests.
|
General proxy for all network requests.
|
||||||
|
|
||||||
|
### `ANDROID_API_LEVEL`
|
||||||
|
|
||||||
|
Used with `--python-platform aarch64-linux-android` and related variants to set the
|
||||||
|
Android API level. (i.e., the minimum supported Android API level).
|
||||||
|
|
||||||
|
Defaults to `24`.
|
||||||
|
|
||||||
### `APPDATA`
|
### `APPDATA`
|
||||||
|
|
||||||
Path to user-level configuration directory on Windows systems.
|
Path to user-level configuration directory on Windows systems.
|
||||||
|
|
|
||||||
10
uv.schema.json
generated
10
uv.schema.json
generated
|
|
@ -2426,6 +2426,16 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "aarch64-manylinux_2_40"
|
"const": "aarch64-manylinux_2_40"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "An ARM64 Android target.\n\nBy default uses Android API level 24, but respects\nthe `ANDROID_API_LEVEL` environment variable if set.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "aarch64-linux-android"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "An `x86_64` Android target.\n\nBy default uses Android API level 24, but respects\nthe `ANDROID_API_LEVEL` environment variable if set.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "x86_64-linux-android"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.",
|
"description": "A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue