From b62a81549bc53e47dccfe2977a5119faf0d47611 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Thu, 29 Feb 2024 15:52:48 -0500 Subject: [PATCH] uv-interpreter: cut alternative implementation of site-packages python This is a separate commit so that the alternative is preserved in history. --- crates/uv-interpreter/src/interpreter.rs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/crates/uv-interpreter/src/interpreter.rs b/crates/uv-interpreter/src/interpreter.rs index f9ebce00c..f59bc96cb 100644 --- a/crates/uv-interpreter/src/interpreter.rs +++ b/crates/uv-interpreter/src/interpreter.rs @@ -421,21 +421,6 @@ impl Interpreter { } else { "python" } - - // This implementation sniffs out what the directory name - // might be from sysconfig, but at the time of writing, this - // seems a little more risky than the simpler but less robust - // implementation above. - /* - const FALLBACK: &str = "python"; - let Some(base) = self.include().file_name().and_then(|name| name.to_str()) else { - return FALLBACK; - }; - base.char_indices() - .take_while(|(_, ch)| ch.is_ascii_alphabetic()) - .last() - .map_or(FALLBACK, |(end, ch)| &base[..end + ch.len_utf8()]) - */ } /// Return the [`Layout`] environment used to install wheels into this interpreter.