Refactor os, arch, and libc information into a shared Platform type (#15027)

Addresses this outstanding item from a previous review
https://github.com/astral-sh/uv/pull/13724#discussion_r2114867288

I'm interested in this now for consolidating some logic in #12731
This commit is contained in:
Zanie Blue
2025-08-13 09:02:55 -05:00
committed by GitHub
parent 323aa8f332
commit 78c8c711fa
8 changed files with 698 additions and 172 deletions
+2 -5
View File
@@ -22,8 +22,7 @@ use uv_install_wheel::Layout;
use uv_pep440::Version;
use uv_pep508::{MarkerEnvironment, StringVersion};
use uv_platform::{Arch, Libc, Os};
use uv_platform_tags::Platform;
use uv_platform_tags::{Tags, TagsError};
use uv_platform_tags::{Platform, Tags, TagsError};
use uv_pypi_types::{ResolverMarkerEnvironment, Scheme};
use crate::implementation::LenientImplementationName;
@@ -205,9 +204,7 @@ impl Interpreter {
self.python_minor(),
self.python_patch(),
self.python_version().pre(),
self.os(),
self.arch(),
self.libc(),
uv_platform::Platform::new(self.os(), self.arch(), self.libc()),
self.variant(),
)
}