From b3bdd30961099c9ba84f17ea18ad83888409bf34 Mon Sep 17 00:00:00 2001
From: timrid <6593626+timrid@users.noreply.github.com>
Date: Wed, 3 Sep 2025 00:50:00 +0200
Subject: [PATCH 1/7] initial android support
---
crates/uv-configuration/src/target_triple.rs | 48 ++++++++++++++
crates/uv-platform-tags/src/platform_tag.rs | 37 ++++++++++-
crates/uv-platform-tags/src/tags.rs | 66 +++++++++++++++++++-
crates/uv-static/src/env_vars.rs | 6 ++
docs/reference/cli.md | 20 ++++++
docs/reference/environment.md | 7 +++
uv.schema.json | 10 +++
7 files changed, 190 insertions(+), 4 deletions(-)
diff --git a/crates/uv-configuration/src/target_triple.rs b/crates/uv-configuration/src/target_triple.rs
index d64fcf1b1eeba..837f5adbfaf40 100644
--- a/crates/uv-configuration/src/target_triple.rs
+++ b/crates/uv-configuration/src/target_triple.rs
@@ -233,6 +233,16 @@ pub enum TargetTriple {
#[serde(alias = "aarch64-manylinux240")]
Aarch64Manylinux240,
+ /// An ARM64 Android target.
+ #[cfg_attr(feature = "clap", value(name = "aarch64-linux-android"))]
+ #[serde(rename = "aarch64-linux-android")]
+ Aarch64LinuxAndroid,
+
+ /// An `x86_64` Android target.
+ #[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.
#[cfg_attr(feature = "clap", value(name = "wasm32-pyodide2024"))]
Wasm32Pyodide2024,
@@ -468,6 +478,20 @@ impl TargetTriple {
},
Arch::Wasm32,
),
+ Self::Aarch64LinuxAndroid => {
+ let api_level = android_api_level().map_or(21, |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(21, |api_level| {
+ debug!("Found Android API level: {}", api_level);
+ api_level
+ });
+ Platform::new(Os::Android { api_level }, Arch::X86_64)
+ }
}
}
@@ -509,6 +533,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "aarch64",
Self::Aarch64Manylinux239 => "aarch64",
Self::Aarch64Manylinux240 => "aarch64",
+ Self::Aarch64LinuxAndroid => "aarch64",
+ Self::X8664LinuxAndroid => "x86_64",
Self::Wasm32Pyodide2024 => "wasm32",
}
}
@@ -551,6 +577,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "Linux",
Self::Aarch64Manylinux239 => "Linux",
Self::Aarch64Manylinux240 => "Linux",
+ Self::Aarch64LinuxAndroid => "Android",
+ Self::X8664LinuxAndroid => "Android",
Self::Wasm32Pyodide2024 => "Emscripten",
}
}
@@ -593,6 +621,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "",
Self::Aarch64Manylinux239 => "",
Self::Aarch64Manylinux240 => "",
+ Self::Aarch64LinuxAndroid => "",
+ Self::X8664LinuxAndroid => "",
// 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
// It doesn't really seem to mean anything? But for completeness we include it here.
@@ -638,6 +668,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "",
Self::Aarch64Manylinux239 => "",
Self::Aarch64Manylinux240 => "",
+ Self::Aarch64LinuxAndroid => "",
+ Self::X8664LinuxAndroid => "",
// This is the Emscripten compiler version for Pyodide 2024.
// See https://pyodide.org/en/stable/development/abi.html#pyodide-2024-0
Self::Wasm32Pyodide2024 => "3.1.58",
@@ -682,6 +714,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "posix",
Self::Aarch64Manylinux239 => "posix",
Self::Aarch64Manylinux240 => "posix",
+ Self::Aarch64LinuxAndroid => "posix",
+ Self::X8664LinuxAndroid => "posix",
Self::Wasm32Pyodide2024 => "posix",
}
}
@@ -724,6 +758,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => "linux",
Self::Aarch64Manylinux239 => "linux",
Self::Aarch64Manylinux240 => "linux",
+ Self::Aarch64LinuxAndroid => "android",
+ Self::X8664LinuxAndroid => "android",
Self::Wasm32Pyodide2024 => "emscripten",
}
}
@@ -766,6 +802,8 @@ impl TargetTriple {
Self::Aarch64Manylinux238 => true,
Self::Aarch64Manylinux239 => true,
Self::Aarch64Manylinux240 => true,
+ Self::Aarch64LinuxAndroid => false,
+ Self::X8664LinuxAndroid => false,
Self::Wasm32Pyodide2024 => false,
}
}
@@ -799,3 +837,13 @@ fn macos_deployment_target() -> Option<(u16, u16)> {
Some((major, minor))
}
+
+/// Return the macOS deployment target as parsed from the environment.
+fn android_api_level() -> Option
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--quiet, -qUse quiet output.
Repeating this option, e.g., -qq, will enable a silent mode in which uv will write no output to stdout.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--quiet, -qUse quiet output.
Repeating this option, e.g., -qq, will enable a silent mode in which uv will write no output to stdout.
--universal to display the tree for all platforms,
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--python-version python-versionThe Python version to use when filtering the tree.
For example, pass --python-version 3.10 to display the dependencies that would be included when installing on Python 3.10.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--quiet, -qUse quiet output.
Repeating this option, e.g., -qq, will enable a silent mode in which uv will write no output to stdout.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--quiet, -qUse quiet output.
Repeating this option, e.g., -qq, will enable a silent mode in which uv will write no output to stdout.
--all to apply to all tools.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--quiet, -qUse quiet output.
Repeating this option, e.g., -qq, will enable a silent mode in which uv will write no output to stdout.
--python-version.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--python-version python-versionThe Python version to use for resolution.
For example, 3.8 or 3.8.17.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--python-version python-versionThe minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platform
aarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--python-version python-versionThe minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.
aarch64-manylinux_2_38: An ARM64 target for the manylinux_2_38 platformaarch64-manylinux_2_39: An ARM64 target for the manylinux_2_39 platformaarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platformaarch64-linux-android: An ARM64 Android targetx86_64-linux-android: An x86_64 Android targetwasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12--python-version python-versionThe Python version against which packages should be checked.
By default, the installed packages are checked against the version of the current interpreter.
diff --git a/docs/reference/environment.md b/docs/reference/environment.md index 3b017178d518c..eb4aacc63d9ff 100644 --- a/docs/reference/environment.md +++ b/docs/reference/environment.md @@ -561,6 +561,13 @@ Used for trusted publishing via `uv publish`. Contains the oidc token url. 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 `21`. + ### `APPDATA` Path to user-level configuration directory on Windows systems. diff --git a/uv.schema.json b/uv.schema.json index 6deddd4be8442..cc21a5b878844 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -2421,6 +2421,16 @@ "type": "string", "const": "aarch64-manylinux_2_40" }, + { + "description": "An ARM64 Android target.", + "type": "string", + "const": "aarch64-linux-android" + }, + { + "description": "An `x86_64` Android target.", + "type": "string", + "const": "x86_64-linux-android" + }, { "description": "A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12.", "type": "string", From a131fbb9aa771fc5d5839a1739745b934dd8a7ae Mon Sep 17 00:00:00 2001 From: timrid <6593626+timrid@users.noreply.github.com> Date: Wed, 3 Sep 2025 00:57:21 +0200 Subject: [PATCH 2/7] update docs --- crates/uv-cli/src/lib.rs | 27 ++++++++++++++++++++ crates/uv-configuration/src/target_triple.rs | 6 +++++ docs/reference/cli.md | 9 +++++++ uv.schema.json | 4 +-- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index b14b2a62a2f26..a8c8660672ca6 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -1440,6 +1440,9 @@ pub struct PipCompileArgs { /// /// 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`. + /// + /// When targeting Android, the default minimum Android API level is `21`. Use + /// `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`. #[arg(long)] pub python_platform: OptionMay also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
--all to apply to all tools.
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
--python-version.
--python-platform python-platformThe platform for which requirements should be resolved.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for WindowsMay also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
UV_PYTHON environment variable.--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. 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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
By default, the installed packages are checked against the platform of the current interpreter.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for WindowsMay also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
--all to apply to all tools.
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
--python-version.
--python-platform python-platformThe platform for which requirements should be resolved.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
When targeting Android, the default minimum Android API level is 24. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for WindowsMay also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
UV_PYTHON environment variable.--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
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 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 the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
By default, the installed packages are checked against the platform of the current interpreter.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
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.
When targeting Android, the default minimum Android API level is 21. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
When targeting Android, the default minimum Android API level is 24. Use ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for Windows