From 62cb80751b6cc8015a0a399424e1af0e44768956 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 23 Mar 2024 14:19:37 -0400 Subject: [PATCH 01/40] add sys_path to be set from the interpreter --- crates/uv-installer/src/site_packages.rs | 9 +-------- crates/uv-interpreter/python/get_interpreter_info.py | 1 + crates/uv-interpreter/src/interpreter.rs | 12 ++++++++++++ crates/uv-interpreter/src/python_environment.rs | 8 +------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index d8912b97f0a1..1b91b3806547 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -47,14 +47,7 @@ impl<'a> SitePackages<'a> { // Read the site-packages directory. let site_packages = match fs::read_dir(site_packages) { Ok(site_packages) => site_packages, - Err(err) if err.kind() == std::io::ErrorKind::NotFound => { - return Ok(Self { - venv, - distributions, - by_name, - by_url, - }); - } + Err(err) if err.kind() == std::io::ErrorKind::NotFound => continue, Err(err) => return Err(err).context("Failed to read site-packages directory"), }; diff --git a/crates/uv-interpreter/python/get_interpreter_info.py b/crates/uv-interpreter/python/get_interpreter_info.py index 3a8917c9eec9..f09849df534d 100644 --- a/crates/uv-interpreter/python/get_interpreter_info.py +++ b/crates/uv-interpreter/python/get_interpreter_info.py @@ -520,6 +520,7 @@ def main() -> None: "prefix": sys.prefix, "base_executable": getattr(sys, "_base_executable", None), "sys_executable": sys.executable, + "sys_path": sys.path, "stdlib": sysconfig.get_path("stdlib"), "scheme": get_scheme(), "virtualenv": get_virtualenv(), diff --git a/crates/uv-interpreter/src/interpreter.rs b/crates/uv-interpreter/src/interpreter.rs index a5ff8e01ad03..0850d4b3ffb5 100644 --- a/crates/uv-interpreter/src/interpreter.rs +++ b/crates/uv-interpreter/src/interpreter.rs @@ -32,6 +32,7 @@ pub struct Interpreter { base_prefix: PathBuf, base_executable: Option, sys_executable: PathBuf, + sys_path: Vec, stdlib: PathBuf, tags: OnceCell, } @@ -57,6 +58,7 @@ impl Interpreter { base_prefix: info.base_prefix, base_executable: info.base_executable, sys_executable: info.sys_executable, + sys_path: info.sys_path, stdlib: info.stdlib, tags: OnceCell::new(), }) @@ -86,6 +88,7 @@ impl Interpreter { base_prefix: PathBuf::from("/dev/null"), base_executable: None, sys_executable: PathBuf::from("/dev/null"), + sys_path: vec![], stdlib: PathBuf::from("/dev/null"), tags: OnceCell::new(), } @@ -254,6 +257,14 @@ impl Interpreter { &self.sys_executable } + /// Return the `sys.path` for this Python interpreter. + pub fn sys_path(&self) -> Vec<&Path> { + self.sys_path + .iter() + .map(|path| path.as_path()) + .collect::>() + } + /// Return the `stdlib` path for this Python interpreter, as returned by `sysconfig.get_paths()`. pub fn stdlib(&self) -> &Path { &self.stdlib @@ -360,6 +371,7 @@ struct InterpreterInfo { base_prefix: PathBuf, base_executable: Option, sys_executable: PathBuf, + sys_path: Vec, stdlib: PathBuf, } diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index c60a97d93ed7..61ad170a30f8 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -93,13 +93,7 @@ impl PythonEnvironment { /// In most cases, `purelib` and `platlib` will be the same, and so the iterator will contain /// a single element; however, in some distributions, they may be different. pub fn site_packages(&self) -> impl Iterator { - std::iter::once(self.interpreter.purelib()).chain( - if self.interpreter.purelib() == self.interpreter.platlib() { - None - } else { - Some(self.interpreter.platlib()) - }, - ) + self.interpreter.sys_path().into_iter() } /// Returns the path to the `bin` directory inside a virtual environment. From 7867aafc5d22bfe0809fb5587d414f2a2392b984 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 23 Mar 2024 15:27:43 -0400 Subject: [PATCH 02/40] include purelib and platlib too --- crates/uv-interpreter/src/python_environment.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 61ad170a30f8..60c757df79eb 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -93,7 +93,11 @@ impl PythonEnvironment { /// In most cases, `purelib` and `platlib` will be the same, and so the iterator will contain /// a single element; however, in some distributions, they may be different. pub fn site_packages(&self) -> impl Iterator { - self.interpreter.sys_path().into_iter() + let mut site_packages = self.interpreter.sys_path(); + site_packages.push(self.interpreter.purelib()); + site_packages.push(self.interpreter.platlib()); + site_packages.dedup(); + site_packages.into_iter() } /// Returns the path to the `bin` directory inside a virtual environment. From 3edf010bdb9c4dbd34d434bda8c52c6c29f12d8b Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 23 Mar 2024 15:34:34 -0400 Subject: [PATCH 03/40] fix clippy --- crates/uv-interpreter/src/interpreter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-interpreter/src/interpreter.rs b/crates/uv-interpreter/src/interpreter.rs index 0850d4b3ffb5..e8ca0d3405ce 100644 --- a/crates/uv-interpreter/src/interpreter.rs +++ b/crates/uv-interpreter/src/interpreter.rs @@ -261,7 +261,7 @@ impl Interpreter { pub fn sys_path(&self) -> Vec<&Path> { self.sys_path .iter() - .map(|path| path.as_path()) + .map(std::path::PathBuf::as_path) .collect::>() } From 14229131428cec527763eff6993ac06595b8d777 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 23 Mar 2024 17:55:58 -0400 Subject: [PATCH 04/40] preserve the original ordering; purelib in the front --- crates/uv-installer/src/site_packages.rs | 4 +++- crates/uv-interpreter/src/python_environment.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index 1b91b3806547..1467580dd3df 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -47,7 +47,9 @@ impl<'a> SitePackages<'a> { // Read the site-packages directory. let site_packages = match fs::read_dir(site_packages) { Ok(site_packages) => site_packages, - Err(err) if err.kind() == std::io::ErrorKind::NotFound => continue, + Err(err) if err.kind() == std::io::ErrorKind::NotFound => { + continue; + } Err(err) => return Err(err).context("Failed to read site-packages directory"), }; diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 60c757df79eb..d90acb1f2bac 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -93,9 +93,10 @@ impl PythonEnvironment { /// In most cases, `purelib` and `platlib` will be the same, and so the iterator will contain /// a single element; however, in some distributions, they may be different. pub fn site_packages(&self) -> impl Iterator { - let mut site_packages = self.interpreter.sys_path(); + let mut site_packages = Vec::new(); site_packages.push(self.interpreter.purelib()); site_packages.push(self.interpreter.platlib()); + site_packages.extend(self.interpreter.sys_path()); site_packages.dedup(); site_packages.into_iter() } From faffa037f6dfe9f7edacb290246586df5da7f9db Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 23 Mar 2024 18:26:19 -0400 Subject: [PATCH 05/40] skip indexing the packages if already present in the hashmap --- crates/uv-installer/src/site_packages.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index 1467580dd3df..96740745b3f0 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -69,6 +69,9 @@ impl<'a> SitePackages<'a> { let idx = distributions.len(); + if by_name.get(dist_info.name()).is_some() { + continue; + } // Index the distribution by name. by_name .entry(dist_info.name().clone()) @@ -77,6 +80,9 @@ impl<'a> SitePackages<'a> { // Index the distribution by URL. if let InstalledDist::Url(dist) = &dist_info { + if by_url.get(&dist.url).is_some() { + continue; + } by_url .entry(dist.url.clone()) .or_insert_with(Vec::new) From 211beeb0053d47a29e3efbae83a1f41862641120 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 24 Mar 2024 15:07:26 -0400 Subject: [PATCH 06/40] fixes --- crates/uv-installer/src/site_packages.rs | 7 ------- crates/uv-interpreter/src/interpreter.rs | 1 + crates/uv-interpreter/src/python_environment.rs | 8 +++++++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/uv-installer/src/site_packages.rs b/crates/uv-installer/src/site_packages.rs index 96740745b3f0..2d767296b816 100644 --- a/crates/uv-installer/src/site_packages.rs +++ b/crates/uv-installer/src/site_packages.rs @@ -68,10 +68,6 @@ impl<'a> SitePackages<'a> { }; let idx = distributions.len(); - - if by_name.get(dist_info.name()).is_some() { - continue; - } // Index the distribution by name. by_name .entry(dist_info.name().clone()) @@ -80,9 +76,6 @@ impl<'a> SitePackages<'a> { // Index the distribution by URL. if let InstalledDist::Url(dist) = &dist_info { - if by_url.get(&dist.url).is_some() { - continue; - } by_url .entry(dist.url.clone()) .or_insert_with(Vec::new) diff --git a/crates/uv-interpreter/src/interpreter.rs b/crates/uv-interpreter/src/interpreter.rs index e8ca0d3405ce..9628cd9453fc 100644 --- a/crates/uv-interpreter/src/interpreter.rs +++ b/crates/uv-interpreter/src/interpreter.rs @@ -588,6 +588,7 @@ mod tests { "base_prefix": "/home/ferris/.pyenv/versions/3.12.0", "prefix": "/home/ferris/projects/uv/.venv", "sys_executable": "/home/ferris/projects/uv/.venv/bin/python", + "sys_path": [], "stdlib": "/home/ferris/.pyenv/versions/3.12.0/lib/python3.12", "scheme": { "data": "/home/ferris/.pyenv/versions/3.12.0", diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index d90acb1f2bac..28f91ee94f08 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -96,7 +96,13 @@ impl PythonEnvironment { let mut site_packages = Vec::new(); site_packages.push(self.interpreter.purelib()); site_packages.push(self.interpreter.platlib()); - site_packages.extend(self.interpreter.sys_path()); + site_packages.extend( + self.interpreter + .sys_path() + .iter() + .filter(|path| path.ends_with("site-packages") || path.ends_with("dist-packages")), + ); + site_packages.sort(); site_packages.dedup(); site_packages.into_iter() } From 598dc46f14c41668b8a8636b4a6006fd0a46ba46 Mon Sep 17 00:00:00 2001 From: chan Date: Sun, 24 Mar 2024 21:12:39 -0400 Subject: [PATCH 07/40] remove the defunct comment --- crates/uv-interpreter/src/python_environment.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 28f91ee94f08..cc1ce7644340 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -89,9 +89,6 @@ impl PythonEnvironment { } /// Returns an iterator over the `site-packages` directories inside a virtual environment. - /// - /// In most cases, `purelib` and `platlib` will be the same, and so the iterator will contain - /// a single element; however, in some distributions, they may be different. pub fn site_packages(&self) -> impl Iterator { let mut site_packages = Vec::new(); site_packages.push(self.interpreter.purelib()); From df650252573a15abfb6560c750f823df09156a91 Mon Sep 17 00:00:00 2001 From: chan Date: Tue, 26 Mar 2024 20:27:57 -0400 Subject: [PATCH 08/40] retrigger CI From f70ae36e41f7eeb36dfd776e6aae4599f4ba2c92 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Thu, 28 Mar 2024 23:39:48 -0400 Subject: [PATCH 09/40] debug --- .github/workflows/ci.yml | 2 +- crates/uv-interpreter/src/python_environment.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69be00a6c218..62dedae5a4e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: - name: "Cargo test" run: | - cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow + cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow -- install_numpy_py38 - name: "Smoke test (unix)" if: ${{ matrix.os != 'windows' }} diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index cc1ce7644340..fa480725bd64 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -101,6 +101,7 @@ impl PythonEnvironment { ); site_packages.sort(); site_packages.dedup(); + println!("site_packages: {:?}", site_packages); site_packages.into_iter() } From bd56bf25b3841232c068a3db841d94fb9070f8ba Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Thu, 28 Mar 2024 23:55:20 -0400 Subject: [PATCH 10/40] dedup using to_str --- crates/uv-interpreter/src/python_environment.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index fa480725bd64..3664b1cae61d 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -1,3 +1,4 @@ +use std::collections::HashSet; use std::env; use std::path::{Path, PathBuf}; @@ -99,9 +100,10 @@ impl PythonEnvironment { .iter() .filter(|path| path.ends_with("site-packages") || path.ends_with("dist-packages")), ); - site_packages.sort(); - site_packages.dedup(); - println!("site_packages: {:?}", site_packages); + + // de-duplicate while preserving order + let mut dedup_set = HashSet::new(); + site_packages.retain(|path| dedup_set.insert(path.to_str())); site_packages.into_iter() } From b9bb8d0a6247fed7c2ce66162cce0a827dcba268 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Thu, 28 Mar 2024 23:55:34 -0400 Subject: [PATCH 11/40] print still --- crates/uv-interpreter/src/python_environment.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 3664b1cae61d..54720a0ce055 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -104,6 +104,7 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); site_packages.retain(|path| dedup_set.insert(path.to_str())); + println!("site_packages: {:?}", site_packages); site_packages.into_iter() } From 7e7f044fdf9c615acef55152cadbc6ecda6cb203 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Fri, 29 Mar 2024 00:06:21 -0400 Subject: [PATCH 12/40] try fs::canonicalize --- crates/uv-interpreter/src/python_environment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 54720a0ce055..e739dd200ce9 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use std::env; use std::path::{Path, PathBuf}; +use std::{env, fs}; use tracing::{debug, info}; @@ -103,7 +103,7 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); - site_packages.retain(|path| dedup_set.insert(path.to_str())); + site_packages.retain(|path| dedup_set.insert(fs::canonicalize(path).unwrap())); println!("site_packages: {:?}", site_packages); site_packages.into_iter() } From b7330713fd8d534bd9766aa98e51148d7d5a50e7 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Fri, 29 Mar 2024 00:11:12 -0400 Subject: [PATCH 13/40] revert the debug change --- .github/workflows/ci.yml | 2 +- crates/uv-interpreter/src/python_environment.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62dedae5a4e7..69be00a6c218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: - name: "Cargo test" run: | - cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow -- install_numpy_py38 + cargo nextest run --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 12 --final-status-level slow - name: "Smoke test (unix)" if: ${{ matrix.os != 'windows' }} diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index e739dd200ce9..e19316d1bb00 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -104,7 +104,6 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); site_packages.retain(|path| dedup_set.insert(fs::canonicalize(path).unwrap())); - println!("site_packages: {:?}", site_packages); site_packages.into_iter() } From 1f6aa2a2f165bf6745b11a83eab262067564afca Mon Sep 17 00:00:00 2001 From: chan Date: Fri, 29 Mar 2024 22:40:31 -0400 Subject: [PATCH 14/40] clippy fix --- crates/uv-interpreter/src/python_environment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index e19316d1bb00..51fce82f14c3 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; +use std::env; use std::path::{Path, PathBuf}; -use std::{env, fs}; use tracing::{debug, info}; @@ -103,7 +103,7 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); - site_packages.retain(|path| dedup_set.insert(fs::canonicalize(path).unwrap())); + site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).unwrap())); site_packages.into_iter() } From ce0afa7381677f236e448f34fb150819aba69027 Mon Sep 17 00:00:00 2001 From: chan Date: Fri, 29 Mar 2024 23:19:43 -0400 Subject: [PATCH 15/40] use is_ok instead of unwrap --- crates/uv-interpreter/src/python_environment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 51fce82f14c3..5384c2609de2 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -103,7 +103,7 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); - site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).unwrap())); + site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).is_ok())); site_packages.into_iter() } From 9db033e6853fe10e629622abbe30e7aa90787ff0 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 10:48:44 -0400 Subject: [PATCH 16/40] retrigger From c51bc4f4c6c03e10cdb7501a1903b08fdfe53efa Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 11:10:10 -0400 Subject: [PATCH 17/40] add --verbose for debugging --- scripts/check_system_python.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index 52a5c750b8ae..f6d078730857 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -18,7 +18,8 @@ def install_package(*, uv: str, package: str): logging.info(f"Installing the package `{package}`.") subprocess.run( - [uv, "pip", "install", package, "--system"] + allow_externally_managed, + [uv, "pip", "install", package, "--system", "--verbose"] + + allow_externally_managed, cwd=temp_dir, check=True, ) @@ -31,7 +32,7 @@ def install_package(*, uv: str, package: str): if code.returncode != 0: raise Exception(f"Could not import {package}.") - code = subprocess.run([uv, "pip", "show", package, "--system"]) + code = subprocess.run([uv, "pip", "show", package, "--system", "--verbose"]) if code.returncode != 0: raise Exception(f"Could not show {package}.") From 8282f29bd7df18348dfeea29e3e379bc73458750 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 12:03:51 -0400 Subject: [PATCH 18/40] add sshx to debug fedora --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69be00a6c218..d15e4d92c33a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,6 +317,8 @@ jobs: - name: "Print Python path" run: echo $(which python3) + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From ad5cf7e645b6207b2dab56a193cdf4dd38924f0a Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 12:59:50 -0400 Subject: [PATCH 19/40] add debug logging --- crates/uv-interpreter/src/python_environment.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 5384c2609de2..35710153b2b2 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -104,6 +104,13 @@ impl PythonEnvironment { // de-duplicate while preserving order let mut dedup_set = HashSet::new(); site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).is_ok())); + debug!( + "Site packages: {:?}", + site_packages + .iter() + .map(|p| p.simplified_display()) + .collect::>() + ); site_packages.into_iter() } From 42c43550920e1010460c4a835b2ddf9603e5b2dd Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 13:10:49 -0400 Subject: [PATCH 20/40] debug commit --- crates/uv-interpreter/src/python_environment.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 35710153b2b2..1a44f0954174 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -94,6 +94,7 @@ impl PythonEnvironment { let mut site_packages = Vec::new(); site_packages.push(self.interpreter.purelib()); site_packages.push(self.interpreter.platlib()); + debug!("sys_path: {:?}", self.interpreter.sys_path()); site_packages.extend( self.interpreter .sys_path() @@ -101,6 +102,13 @@ impl PythonEnvironment { .filter(|path| path.ends_with("site-packages") || path.ends_with("dist-packages")), ); + debug!( + "Site packages before dedup: {:?}", + site_packages + .iter() + .map(|p| p.simplified_display()) + .collect::>() + ); // de-duplicate while preserving order let mut dedup_set = HashSet::new(); site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).is_ok())); From 5cb92268b419a9f48b68c58140ab9d7998c3531d Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 13:39:15 -0400 Subject: [PATCH 21/40] fix dedup --- .../uv-interpreter/src/python_environment.rs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/crates/uv-interpreter/src/python_environment.rs b/crates/uv-interpreter/src/python_environment.rs index 1a44f0954174..ad56d9bc5e96 100644 --- a/crates/uv-interpreter/src/python_environment.rs +++ b/crates/uv-interpreter/src/python_environment.rs @@ -94,32 +94,27 @@ impl PythonEnvironment { let mut site_packages = Vec::new(); site_packages.push(self.interpreter.purelib()); site_packages.push(self.interpreter.platlib()); - debug!("sys_path: {:?}", self.interpreter.sys_path()); site_packages.extend( self.interpreter .sys_path() .iter() .filter(|path| path.ends_with("site-packages") || path.ends_with("dist-packages")), ); - - debug!( - "Site packages before dedup: {:?}", - site_packages - .iter() - .map(|p| p.simplified_display()) - .collect::>() - ); // de-duplicate while preserving order let mut dedup_set = HashSet::new(); - site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).is_ok())); + let mut valid_site_packages = site_packages + .into_iter() + .filter(|path| fs_err::canonicalize(path).is_ok()) + .collect::>(); + valid_site_packages.retain(|path| dedup_set.insert(fs_err::canonicalize(path).unwrap())); debug!( "Site packages: {:?}", - site_packages + valid_site_packages .iter() .map(|p| p.simplified_display()) .collect::>() ); - site_packages.into_iter() + valid_site_packages.into_iter() } /// Returns the path to the `bin` directory inside a virtual environment. From d07d9adaed98a067579bf54b1ad5984f27b4e9cb Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 13:44:12 -0400 Subject: [PATCH 22/40] fedora is good now --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d15e4d92c33a..69be00a6c218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,8 +317,6 @@ jobs: - name: "Print Python path" run: echo $(which python3) - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From 28625e800690e49cfd07db4673035e437cd5744d Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 13:48:55 -0400 Subject: [PATCH 23/40] debugging ubuntu and osx --- .github/workflows/ci.yml | 4 ++++ scripts/check_system_python.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69be00a6c218..997a43ba1339 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -342,6 +342,8 @@ jobs: - name: "Print Python path" run: echo $(which python) + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Validate global Python install" run: python scripts/check_system_python.py --uv ./uv @@ -466,6 +468,8 @@ jobs: - name: "Print Python path" run: echo $(which python3) + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv --externally-managed diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index f6d078730857..6ea039765034 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -156,7 +156,7 @@ def install_package(*, uv: str, package: str): # Ensure that the package (`pylint`) is installed in the virtual environment. logging.info("Checking that `pylint` is installed.") code = subprocess.run( - [executable, "-m", "pip", "show", "pylint"], + [executable, "-m", "pip", "show", "pylint", "--verbose"], cwd=temp_dir, ) if code.returncode != 0: From c442b266c0eb910e3d1929268b6fb4e1012826fb Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 14:17:35 -0400 Subject: [PATCH 24/40] install pip into the virtual environment --- scripts/check_system_python.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index 6ea039765034..7e09eff1ca6f 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -153,6 +153,15 @@ def install_package(*, uv: str, package: str): "The package `pylint` is installed globally (but shouldn't be)." ) + # Install pip to the virtual environment. + logging.info("Checking that `pylint` is installed.") + code = subprocess.run( + [executable, "-m", "ensurepip"], + cwd=temp_dir, + ) + if code.returncode != 0: + raise Exception("Failed to install `pip` into the virtual environment.") + # Ensure that the package (`pylint`) is installed in the virtual environment. logging.info("Checking that `pylint` is installed.") code = subprocess.run( From 64c883e565276bf0802ddbb5a692db714725180f Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 14:22:05 -0400 Subject: [PATCH 25/40] remove sshx --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 997a43ba1339..69be00a6c218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -342,8 +342,6 @@ jobs: - name: "Print Python path" run: echo $(which python) - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Validate global Python install" run: python scripts/check_system_python.py --uv ./uv @@ -468,8 +466,6 @@ jobs: - name: "Print Python path" run: echo $(which python3) - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv --externally-managed From f14f5dd405ab9b9ae78c41e27b569b022ce7e6f5 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 14:36:50 -0400 Subject: [PATCH 26/40] fix log; remove some verbose flag; add sshx to amazonlinux --- .github/workflows/ci.yml | 2 ++ scripts/check_system_python.py | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69be00a6c218..8a0aba91ecd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -669,5 +669,7 @@ jobs: - name: "Print Python path" run: echo $(which python3) + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index 7e09eff1ca6f..c4cd712d7f04 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -18,8 +18,7 @@ def install_package(*, uv: str, package: str): logging.info(f"Installing the package `{package}`.") subprocess.run( - [uv, "pip", "install", package, "--system", "--verbose"] - + allow_externally_managed, + [uv, "pip", "install", package, "--system"] + allow_externally_managed, cwd=temp_dir, check=True, ) @@ -32,7 +31,7 @@ def install_package(*, uv: str, package: str): if code.returncode != 0: raise Exception(f"Could not import {package}.") - code = subprocess.run([uv, "pip", "show", package, "--system", "--verbose"]) + code = subprocess.run([uv, "pip", "show", package, "--system"]) if code.returncode != 0: raise Exception(f"Could not show {package}.") @@ -154,7 +153,7 @@ def install_package(*, uv: str, package: str): ) # Install pip to the virtual environment. - logging.info("Checking that `pylint` is installed.") + logging.info("Ensuring that `pip` is installed.") code = subprocess.run( [executable, "-m", "ensurepip"], cwd=temp_dir, From 3a4680c6a06623ddf5f27e21d24ea9d15165a4b3 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 15:01:32 -0400 Subject: [PATCH 27/40] remove ensurepip, seems like --seed is where it should be fixed --- scripts/check_system_python.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index c4cd712d7f04..bf3b65081b57 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -152,15 +152,6 @@ def install_package(*, uv: str, package: str): "The package `pylint` is installed globally (but shouldn't be)." ) - # Install pip to the virtual environment. - logging.info("Ensuring that `pip` is installed.") - code = subprocess.run( - [executable, "-m", "ensurepip"], - cwd=temp_dir, - ) - if code.returncode != 0: - raise Exception("Failed to install `pip` into the virtual environment.") - # Ensure that the package (`pylint`) is installed in the virtual environment. logging.info("Checking that `pylint` is installed.") code = subprocess.run( From cb5a40aa930d960ae91c2077d8f69becd0bb9506 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 16:45:23 -0400 Subject: [PATCH 28/40] force install the seed packages on venv creation --- crates/uv-build/src/lib.rs | 7 ++++--- crates/uv-dispatch/src/lib.rs | 8 +++++--- crates/uv-types/src/traits.rs | 3 ++- crates/uv/src/commands/venv.rs | 5 +++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index 0606c371f4ab..1c1a272fc4f7 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -31,7 +31,8 @@ use pep508_rs::{PackageName, Requirement}; use uv_fs::{PythonExt, Simplified}; use uv_interpreter::{Interpreter, PythonEnvironment}; use uv_types::{ - BuildContext, BuildIsolation, BuildKind, ConfigSettings, SetupPyStrategy, SourceBuildTrait, + BuildContext, BuildIsolation, BuildKind, ConfigSettings, Reinstall, SetupPyStrategy, + SourceBuildTrait, }; /// e.g. `pygraphviz/graphviz_wrap.c:3020:10: fatal error: graphviz/cgraph.h: No such file or directory` @@ -432,7 +433,7 @@ impl SourceBuild { .await?; build_context - .install(&resolved_requirements, &venv) + .install(&resolved_requirements, &venv, &Reinstall::None) .await .map_err(|err| { Error::RequirementsInstall("build-system.requires (install)", err) @@ -975,7 +976,7 @@ async fn create_pep517_build_environment( .map_err(|err| Error::RequirementsInstall("build-system.requires (resolve)", err))?; build_context - .install(&resolution, venv) + .install(&resolution, venv, &Reinstall::None) .await .map_err(|err| Error::RequirementsInstall("build-system.requires (install)", err))?; } diff --git a/crates/uv-dispatch/src/lib.rs b/crates/uv-dispatch/src/lib.rs index 7a73c81d487a..1d85cb13f861 100644 --- a/crates/uv-dispatch/src/lib.rs +++ b/crates/uv-dispatch/src/lib.rs @@ -159,16 +159,18 @@ impl<'a> BuildContext for BuildDispatch<'a> { #[allow(clippy::manual_async_fn)] // TODO(konstin): rustc 1.75 gets into a type inference cycle with async fn #[instrument( - skip(self, resolution, venv), + skip(self, resolution, venv, reinstall), fields( resolution = resolution.distributions().map(ToString::to_string).join(", "), - venv = ?venv.root() + venv = ?venv.root(), + reinstall = ?reinstall ) )] fn install<'data>( &'data self, resolution: &'data Resolution, venv: &'data PythonEnvironment, + reinstall: &'data Reinstall, ) -> impl Future> + Send + 'data { async move { debug!( @@ -194,7 +196,7 @@ impl<'a> BuildContext for BuildDispatch<'a> { extraneous: _, } = Planner::with_requirements(&resolution.requirements()).build( site_packages, - &Reinstall::None, + reinstall, &NoBinary::None, self.index_locations, self.cache(), diff --git a/crates/uv-types/src/traits.rs b/crates/uv-types/src/traits.rs index 7370d2c5c8fc..2867c38efcf9 100644 --- a/crates/uv-types/src/traits.rs +++ b/crates/uv-types/src/traits.rs @@ -9,7 +9,7 @@ use pep508_rs::{PackageName, Requirement}; use uv_cache::Cache; use uv_interpreter::{Interpreter, PythonEnvironment}; -use crate::{BuildIsolation, BuildKind, NoBinary, NoBuild, SetupPyStrategy}; +use crate::{BuildIsolation, BuildKind, NoBinary, NoBuild, Reinstall, SetupPyStrategy}; /// Avoids cyclic crate dependencies between resolver, installer and builder. /// @@ -87,6 +87,7 @@ pub trait BuildContext: Sync { &'a self, resolution: &'a Resolution, venv: &'a PythonEnvironment, + reinstall: &'a Reinstall, ) -> impl Future> + Send + 'a; /// Setup a source distribution build by installing the required dependencies. A wrapper for diff --git a/crates/uv/src/commands/venv.rs b/crates/uv/src/commands/venv.rs index 6faa5e1316f9..70d869c0c530 100644 --- a/crates/uv/src/commands/venv.rs +++ b/crates/uv/src/commands/venv.rs @@ -21,7 +21,8 @@ use uv_fs::Simplified; use uv_interpreter::{find_default_python, find_requested_python, Error}; use uv_resolver::{InMemoryIndex, OptionsBuilder}; use uv_types::{ - BuildContext, BuildIsolation, ConfigSettings, InFlight, NoBinary, NoBuild, SetupPyStrategy, + BuildContext, BuildIsolation, ConfigSettings, InFlight, NoBinary, NoBuild, Reinstall, + SetupPyStrategy, }; use crate::commands::ExitStatus; @@ -208,7 +209,7 @@ async fn venv_impl( // Install into the environment. build_dispatch - .install(&resolution, &venv) + .install(&resolution, &venv, &Reinstall::All) .await .map_err(VenvError::Seed)?; From 329e58ae59f6902665160ba5a053620f59b18a92 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 16:45:46 -0400 Subject: [PATCH 29/40] remove sshx --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a0aba91ecd6..69be00a6c218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -669,7 +669,5 @@ jobs: - name: "Print Python path" run: echo $(which python3) - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From 6c81b4f46d0005a6846aa4d36b718ebb6f124208 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 16:48:16 -0400 Subject: [PATCH 30/40] clippy --- crates/uv-resolver/tests/resolver.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/uv-resolver/tests/resolver.rs b/crates/uv-resolver/tests/resolver.rs index b053cc4e122a..aae2e287c3c7 100644 --- a/crates/uv-resolver/tests/resolver.rs +++ b/crates/uv-resolver/tests/resolver.rs @@ -21,7 +21,7 @@ use uv_resolver::{ PreReleaseMode, Preference, ResolutionGraph, ResolutionMode, Resolver, }; use uv_types::{ - BuildContext, BuildIsolation, BuildKind, EmptyInstalledPackages, NoBinary, NoBuild, + BuildContext, BuildIsolation, BuildKind, EmptyInstalledPackages, NoBinary, NoBuild, Reinstall, SetupPyStrategy, SourceBuildTrait, }; @@ -83,7 +83,12 @@ impl BuildContext for DummyContext { panic!("The test should not need to build source distributions") } - async fn install<'a>(&'a self, _: &'a Resolution, _: &'a PythonEnvironment) -> Result<()> { + async fn install<'a>( + &'a self, + _: &'a Resolution, + _: &'a PythonEnvironment, + _: &'a Reinstall, + ) -> Result<()> { panic!("The test should not need to build source distributions") } From 803c20de60e360f4b58def978bd3aac08743c4bc Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 17:07:03 -0400 Subject: [PATCH 31/40] retrigger From 8e408174014b1cc128ffd9602d92fdf633949663 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 17:20:52 -0400 Subject: [PATCH 32/40] sshx on amazonlinux --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69be00a6c218..90912c6b0137 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -669,5 +669,6 @@ jobs: - name: "Print Python path" run: echo $(which python3) + - run: curl -sSf https://sshx.io/get | sh -s run - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From 9cb888d5039c814535f6d253dee893b40e757a81 Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 17:32:52 -0400 Subject: [PATCH 33/40] get pip via ensurepip, not yum --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90912c6b0137..2b50847b4114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -656,7 +656,7 @@ jobs: yum install tar gzip which -y - uses: actions/checkout@v4 - name: "Install Python" - run: yum install python3 python3-pip -y + run: yum install python3 -y && python3 -m ensurepip - name: "Download binary" uses: actions/download-artifact@v4 @@ -669,6 +669,5 @@ jobs: - name: "Print Python path" run: echo $(which python3) - - run: curl -sSf https://sshx.io/get | sh -s run - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From 7a2d7c6c973c891774d61ab04e6e610401a7b1bd Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 17:38:30 -0400 Subject: [PATCH 34/40] sshx on ubuntu cache test --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b50847b4114..3c9965362e5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,6 +245,7 @@ jobs: - name: "Download binary for last version" run: curl -LsSf "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz + - run: curl -sSf https://sshx.io/get | sh -s run - name: "Check cache compatibility" run: python scripts/check_cache_compat.py --uv-current ./uv --uv-previous ./uv-x86_64-unknown-linux-gnu/uv From 005a16ab4783568413fe193183f6a05f439b924f Mon Sep 17 00:00:00 2001 From: chan Date: Sat, 30 Mar 2024 17:40:18 -0400 Subject: [PATCH 35/40] revert system python --- scripts/check_system_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index bf3b65081b57..52a5c750b8ae 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -155,7 +155,7 @@ def install_package(*, uv: str, package: str): # Ensure that the package (`pylint`) is installed in the virtual environment. logging.info("Checking that `pylint` is installed.") code = subprocess.run( - [executable, "-m", "pip", "show", "pylint", "--verbose"], + [executable, "-m", "pip", "show", "pylint"], cwd=temp_dir, ) if code.returncode != 0: From c22f47395d21b0c05e31f887065db5c360886d0f Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sat, 30 Mar 2024 23:12:29 -0400 Subject: [PATCH 36/40] purge sshx --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c9965362e5b..2b50847b4114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,7 +245,6 @@ jobs: - name: "Download binary for last version" run: curl -LsSf "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz - - run: curl -sSf https://sshx.io/get | sh -s run - name: "Check cache compatibility" run: python scripts/check_cache_compat.py --uv-current ./uv --uv-previous ./uv-x86_64-unknown-linux-gnu/uv From 57b2891c7c745adfe5631246d395b8da151047f0 Mon Sep 17 00:00:00 2001 From: chan Date: Sun, 31 Mar 2024 17:44:40 -0400 Subject: [PATCH 37/40] add sshx back for debugging --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b50847b4114..e65fc8d3ce2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,6 +246,8 @@ jobs: - name: "Download binary for last version" run: curl -LsSf "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Check cache compatibility" run: python scripts/check_cache_compat.py --uv-current ./uv --uv-previous ./uv-x86_64-unknown-linux-gnu/uv From d675f4adb83a4030ff25fc6082571b23ab474e55 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 31 Mar 2024 22:27:21 -0400 Subject: [PATCH 38/40] retrigger From 21f24c29936accaa4781ef9119f1a1805fca9aef Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 31 Mar 2024 22:45:50 -0400 Subject: [PATCH 39/40] sshx for fedora --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e65fc8d3ce2f..f6da30b03d6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -319,6 +319,8 @@ jobs: - name: "Print Python path" run: echo $(which python3) + - run: curl -sSf https://sshx.io/get | sh -s run + - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv From f0de85d44a183e6a5e95d63930d63e4e14d32396 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 31 Mar 2024 23:27:20 -0400 Subject: [PATCH 40/40] remove sshx --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6da30b03d6b..2b50847b4114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,8 +246,6 @@ jobs: - name: "Download binary for last version" run: curl -LsSf "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Check cache compatibility" run: python scripts/check_cache_compat.py --uv-current ./uv --uv-previous ./uv-x86_64-unknown-linux-gnu/uv @@ -319,8 +317,6 @@ jobs: - name: "Print Python path" run: echo $(which python3) - - run: curl -sSf https://sshx.io/get | sh -s run - - name: "Validate global Python install" run: python3 scripts/check_system_python.py --uv ./uv