From 82093f2087ad241046535f47bb4c023e742faecc Mon Sep 17 00:00:00 2001 From: Di-Is Date: Sat, 13 Jul 2024 14:13:36 +0000 Subject: [PATCH 1/3] fix: display the same Python as libc in the execution environment. --- crates/uv-python/src/downloads.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index 3c02f8f6c87c..6bf5c08b058e 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -233,6 +233,11 @@ impl PythonDownloadRequest { return false; } } + if let Some(libc) = &self.libc { + if key.libc != *libc { + return false; + } + } if let Some(implementation) = &self.implementation { if key.implementation != LenientImplementationName::from(*implementation) { return false; From 8088a390e7dbc8713f1a152c2135d13db0cb6dcf Mon Sep 17 00:00:00 2001 From: Di-Is Date: Sat, 13 Jul 2024 14:16:16 +0000 Subject: [PATCH 2/3] change: if --all-platforms is specified, python for all architectures and all libc is displayed. --- crates/uv/src/commands/python/list.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv/src/commands/python/list.rs b/crates/uv/src/commands/python/list.rs index 69baf30b69bf..eaff0188a48b 100644 --- a/crates/uv/src/commands/python/list.rs +++ b/crates/uv/src/commands/python/list.rs @@ -113,14 +113,14 @@ pub(crate) async fn list( // Only show the latest patch version for each download unless all were requested if !matches!(kind, Kind::System) { if let [major, minor, ..] = version.release() { - if !seen_minor.insert((os.clone(), *major, *minor)) { + if !seen_minor.insert((os.clone(), *major, *minor, *key.arch(), *key.libc())) { if matches!(kind, Kind::Download) && !all_versions { continue; } } } if let [major, minor, patch] = version.release() { - if !seen_patch.insert((os.clone(), *major, *minor, *patch)) { + if !seen_patch.insert((os.clone(), *major, *minor, *patch, *key.arch(), key.libc())) { if matches!(kind, Kind::Download) { continue; } From 4d356b79f030f88bf4b6d04786caf98d31e80d96 Mon Sep 17 00:00:00 2001 From: Di-Is Date: Sat, 13 Jul 2024 14:32:29 +0000 Subject: [PATCH 3/3] refactor: cargo fmt --- crates/uv/src/commands/python/list.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/uv/src/commands/python/list.rs b/crates/uv/src/commands/python/list.rs index eaff0188a48b..e32762576770 100644 --- a/crates/uv/src/commands/python/list.rs +++ b/crates/uv/src/commands/python/list.rs @@ -120,7 +120,8 @@ pub(crate) async fn list( } } if let [major, minor, patch] = version.release() { - if !seen_patch.insert((os.clone(), *major, *minor, *patch, *key.arch(), key.libc())) { + if !seen_patch.insert((os.clone(), *major, *minor, *patch, *key.arch(), key.libc())) + { if matches!(kind, Kind::Download) { continue; }