Use last non-EOL version for --python-platform macOS (#3469)

## Summary

I think, as a a rule, we can just use the last non-EOL version here for
x86 and ARM.

Closes https://github.com/astral-sh/uv/issues/3454.
This commit is contained in:
Charlie Marsh 2024-05-08 15:54:40 -04:00 committed by GitHub
parent eec99f9349
commit ca809addf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -29,12 +29,13 @@ pub enum TargetTriple {
#[cfg_attr(feature = "schemars", schemars(rename = "x86_64-unknown-linux-gnu"))] #[cfg_attr(feature = "schemars", schemars(rename = "x86_64-unknown-linux-gnu"))]
X8664UnknownLinuxGnu, X8664UnknownLinuxGnu,
/// An ARM-based macOS target, as seen on Apple Silicon devices. /// An ARM-based macOS target, as seen on Apple Silicon devices, with support for the
/// least-recent, non-EOL macOS version (12.0).
#[cfg_attr(feature = "clap", value(name = "aarch64-apple-darwin"))] #[cfg_attr(feature = "clap", value(name = "aarch64-apple-darwin"))]
#[cfg_attr(feature = "schemars", schemars(rename = "aarch64-apple-darwin"))] #[cfg_attr(feature = "schemars", schemars(rename = "aarch64-apple-darwin"))]
Aarch64AppleDarwin, Aarch64AppleDarwin,
/// An x86 macOS target. /// An x86 macOS target, with support for the least-recent, non-EOL macOS version (12.0).
#[cfg_attr(feature = "clap", value(name = "x86_64-apple-darwin"))] #[cfg_attr(feature = "clap", value(name = "x86_64-apple-darwin"))]
#[cfg_attr(feature = "schemars", schemars(rename = "x86_64-apple-darwin"))] #[cfg_attr(feature = "schemars", schemars(rename = "x86_64-apple-darwin"))]
X8664AppleDarwin, X8664AppleDarwin,
@ -96,8 +97,8 @@ impl TargetTriple {
), ),
Self::X8664AppleDarwin => Platform::new( Self::X8664AppleDarwin => Platform::new(
Os::Macos { Os::Macos {
major: 10, major: 12,
minor: 12, minor: 0,
}, },
Arch::X86_64, Arch::X86_64,
), ),

4
uv.schema.json generated
View file

@ -815,14 +815,14 @@
] ]
}, },
{ {
"description": "An ARM-based macOS target, as seen on Apple Silicon devices.", "description": "An ARM-based macOS target, as seen on Apple Silicon devices, with support for the least-recent, non-EOL macOS version (12.0).",
"type": "string", "type": "string",
"enum": [ "enum": [
"aarch64-apple-darwin" "aarch64-apple-darwin"
] ]
}, },
{ {
"description": "An x86 macOS target.", "description": "An x86 macOS target, with support for the least-recent, non-EOL macOS version (12.0).",
"type": "string", "type": "string",
"enum": [ "enum": [
"x86_64-apple-darwin" "x86_64-apple-darwin"