Support iOS platform tags (#15640)

## Summary
This implements the iOS part of
https://github.com/astral-sh/uv/issues/8029

FYI: @freakboy3742

<!-- 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
arm64-apple-ios pillow`. Then the iOS binary of pillow should be
installed inside the venv.
This commit is contained in:
timrid 2025-09-04 00:24:48 +02:00 committed by GitHub
parent 50bfa8a689
commit 330e56e778
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 599 additions and 41 deletions

View file

@ -339,7 +339,8 @@ impl TorchStrategy {
| Os::Illumos { .. }
| Os::Haiku { .. }
| Os::Android { .. }
| Os::Pyodide { .. } => {
| Os::Pyodide { .. }
| Os::Ios { .. } => {
Either::Right(Either::Left(std::iter::once(TorchBackend::Cpu.index_url())))
}
}
@ -369,7 +370,8 @@ impl TorchStrategy {
| Os::Illumos { .. }
| Os::Haiku { .. }
| Os::Android { .. }
| Os::Pyodide { .. } => {
| Os::Pyodide { .. }
| Os::Ios { .. } => {
Either::Right(Either::Left(std::iter::once(TorchBackend::Cpu.index_url())))
}
},
@ -387,7 +389,8 @@ impl TorchStrategy {
| Os::Illumos { .. }
| Os::Haiku { .. }
| Os::Android { .. }
| Os::Pyodide { .. } => {
| Os::Pyodide { .. }
| Os::Ios { .. } => {
Either::Right(Either::Left(std::iter::once(TorchBackend::Cpu.index_url())))
}
},