From a9bceaffc7f4dd42b2bff6b1fff26021064649b2 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 06:55:56 +1000 Subject: [PATCH 1/9] Tweek pyenv version extraction from folder name --- native_locator/src/pyenv.rs | 52 ++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/native_locator/src/pyenv.rs b/native_locator/src/pyenv.rs index 6d66b906c82c..c3203f75d707 100644 --- a/native_locator/src/pyenv.rs +++ b/native_locator/src/pyenv.rs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +use regex::Regex; use std::fs; use std::path::PathBuf; @@ -66,6 +67,38 @@ fn get_pyenv_binary(environment: &impl known::Environment) -> Option { } } +fn get_pyenv_version(folder_name: String) -> Option { + // Stable Versions = like 3.10.10 + let python_regex = Regex::new(r"^(\d+\.\d+\.\d+)$").unwrap(); + match python_regex.captures(&folder_name) { + Some(captures) => match captures.get(1) { + Some(version) => Some(version.as_str().to_string()), + None => None, + }, + None => { + // Dev Versions = like 3.10-dev + let python_regex = Regex::new(r"^(\d+\.\d+-dev)$").unwrap(); + match python_regex.captures(&folder_name) { + Some(captures) => match captures.get(1) { + Some(version) => Some(version.as_str().to_string()), + None => None, + }, + None => { + // Alpha Versions = like 3.10.0a3 + let python_regex = Regex::new(r"^(\d+\.\d+.\d+a\d+)").unwrap(); + match python_regex.captures(&folder_name) { + Some(captures) => match captures.get(1) { + Some(version) => Some(version.as_str().to_string()), + None => None, + }, + None => None, + } + } + } + } + } +} + pub fn find_and_report( dispatcher: &mut impl messaging::MessageDispatcher, environment: &impl known::Environment, @@ -91,18 +124,23 @@ pub fn find_and_report( let path = path.path(); if path.is_dir() { if let Some(executable) = find_python_binary_path(&path) { - let version = path.file_name().unwrap().to_string_lossy().to_string(); + let version = + get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); let env_path = path.to_string_lossy().to_string(); + let activated_run = match version.clone() { + Some(version) => Some(vec![ + pyenv_binary_for_activation.clone(), + "local".to_string(), + version.clone(), + ]), + None => None, + }; dispatcher.report_environment(messaging::PythonEnvironment::new( "Python".to_string(), vec![executable.into_os_string().into_string().unwrap()], messaging::PythonEnvironmentCategory::Pyenv, - Some(version.clone()), - Some(vec![ - pyenv_binary_for_activation.clone(), - "shell".to_string(), - version, - ]), + version, + activated_run, Some(env_path.clone()), Some(env_path), )); From 9ad5743d0f8d8c57a31b107ccd1e832f23f51ff2 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 07:45:28 +1000 Subject: [PATCH 2/9] Add pyenv tests --- native_locator/src/lib.rs | 1 + native_locator/src/pyenv.rs | 6 + native_locator/tests/common.rs | 1 + native_locator/tests/pyenv_test.rs | 159 ++++++++++++++++++ .../pyenv/.PYENV/versions/3.12.1/bin/python | 0 .../pyenv/.PYENV/versions/3.12.1a3/bin/python | 0 .../pyenv/.PYENV/versions/3.13-dev/bin/python | 0 .../pyenv/.PYENV/versions/3.9.9/bin/python | 0 .../.PYENV/versions/anaconda-4.0.0/bin/python | 0 .../mambaforge-4.10.1-4/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda3-2021.04/bin/python | 0 .../mambaforge-4.10.1-4/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../versions/mambaforge-4.10.1-4/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../.PYENV/versions/mambaforge/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../mambaforge/miniforge3-4.11.0-1/bin/python | 0 .../versions/miniconda-latest/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../versions/miniconda3-3.10.1/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../versions/miniconda3-4.0.5/bin/python | 0 .../miniforge3-4.11.0-1/bin/python | 0 .../versions/miniforge3-4.11.0-1/bin/python | 0 .../.PYENV/versions/nogil-3.9.10/bin/python | 0 .../versions/pypy3.10-7.3.14/bin/python | 0 .../.PYENV/versions/pyston-2.3.5/bin/python | 0 .../versions/stacklets-3.7.5/bin/python | 0 .../tests/unix/pyenv/opt/homebrew/bin/pyenv | 0 .../pyenv_without_envs/opt/homebrew/bin/pyenv | 0 47 files changed, 167 insertions(+) create mode 100644 native_locator/tests/pyenv_test.rs create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1a3/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/3.13-dev/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/3.9.9/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/miniforge3-4.11.0-1/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/nogil-3.9.10/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/pypy3.10-7.3.14/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/pyston-2.3.5/bin/python create mode 100644 native_locator/tests/unix/pyenv/.PYENV/versions/stacklets-3.7.5/bin/python create mode 100644 native_locator/tests/unix/pyenv/opt/homebrew/bin/pyenv create mode 100644 native_locator/tests/unix/pyenv_without_envs/opt/homebrew/bin/pyenv diff --git a/native_locator/src/lib.rs b/native_locator/src/lib.rs index d95a4300d253..17ce17253f77 100644 --- a/native_locator/src/lib.rs +++ b/native_locator/src/lib.rs @@ -7,3 +7,4 @@ pub mod common_python; pub mod logging; pub mod conda; pub mod known; +pub mod pyenv; diff --git a/native_locator/src/pyenv.rs b/native_locator/src/pyenv.rs index c3203f75d707..8e7a734a297d 100644 --- a/native_locator/src/pyenv.rs +++ b/native_locator/src/pyenv.rs @@ -126,6 +126,12 @@ pub fn find_and_report( if let Some(executable) = find_python_binary_path(&path) { let version = get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); + + // If we cannot extract version, this isn't a valid pyenv environment. + // Or its one that we're not interested in. + if version.is_none() { + continue; + } let env_path = path.to_string_lossy().to_string(); let activated_run = match version.clone() { Some(version) => Some(vec![ diff --git a/native_locator/tests/common.rs b/native_locator/tests/common.rs index 107e649e3ae5..e75352691b6b 100644 --- a/native_locator/tests/common.rs +++ b/native_locator/tests/common.rs @@ -16,6 +16,7 @@ pub fn test_file_path(paths: &[&str]) -> String { root.to_string_lossy().to_string() } + #[allow(dead_code)] pub fn join_test_paths(paths: &[&str]) -> String { let path: PathBuf = paths.iter().map(|p| p.to_string()).collect(); diff --git a/native_locator/tests/pyenv_test.rs b/native_locator/tests/pyenv_test.rs new file mode 100644 index 000000000000..6f0eec940985 --- /dev/null +++ b/native_locator/tests/pyenv_test.rs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +mod common; + +#[test] +#[cfg(unix)] +fn does_not_find_any_pyenv_envs() { + use crate::common::{create_test_dispatcher, create_test_environment}; + use python_finder::pyenv; + use std::collections::HashMap; + + let mut dispatcher = create_test_dispatcher(); + let known = create_test_environment( + HashMap::new(), + Some("SOME_BOGUS_HOME_DIR".to_string()), + Vec::new(), + ); + + pyenv::find_and_report(&mut dispatcher, &known); + + assert_eq!(dispatcher.messages.len(), 0); +} + +#[test] +#[cfg(unix)] +fn does_not_find_any_pyenv_envs_even_with_pyenv_installed() { + use crate::common::{ + assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, + test_file_path, + }; + use python_finder::pyenv; + use serde_json::json; + use std::{collections::HashMap, path::PathBuf}; + + let mut dispatcher = create_test_dispatcher(); + let home = test_file_path(&["tests", "unix", "pyenv_without_envs"]); + let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); + let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); + let known = create_test_environment( + HashMap::new(), + Some(home.clone()), + vec![PathBuf::from(homebrew_bin)], + ); + + pyenv::find_and_report(&mut dispatcher, &known); + + assert_eq!(dispatcher.messages.len(), 1); + let expected_json = json!({"executablePath":[pyenv_exe],"version":null}); + assert_messages(&[expected_json], &dispatcher) +} + +#[test] +#[cfg(unix)] +fn find_pyenv_envs() { + use crate::common::{ + assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, + test_file_path, + }; + use python_finder::pyenv; + use serde_json::json; + use std::{collections::HashMap, path::PathBuf}; + + let mut dispatcher = create_test_dispatcher(); + let home = test_file_path(&["tests", "unix", "pyenv"]); + let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); + let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); + let known = create_test_environment( + HashMap::new(), + Some(home.clone()), + vec![PathBuf::from(homebrew_bin)], + ); + + pyenv::find_and_report(&mut dispatcher, &known); + + assert_eq!(dispatcher.messages.len(), 5); + let expected_manager = json!({ "executablePath": [pyenv_exe.clone()], "version": null }); + let expected_3_9_9 = json!({"name": "Python","pythonExecutablePath": [join_test_paths(&[home.as_str(), ".pyenv/versions/3.9.9/bin/python"])],"category": "pyenv","version": "3.9.9","activatedRun": [pyenv_exe.clone(), "local", "3.9.9"],"envPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.9.9"]),"sysPrefixPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.9.9/bin/python"])}); + let expected_3_12_1 = json!({"name": "Python","pythonExecutablePath": [join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1/bin/python"])],"category": "pyenv","version": "3.12.1","activatedRun": [pyenv_exe.clone(), "local", "3.12.1"],"envPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1"]),"sysPrefixPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1/bin/python"])}); + let expected_3_13_dev = json!({"name": "Python","pythonExecutablePath": [join_test_paths(&[home.as_str(), ".pyenv/versions/3.13-dev/bin/python"])],"category": "pyenv","version": "3.13-dev","activatedRun": [pyenv_exe.clone(), "local", "3.13-dev"],"envPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.13-dev"]),"sysPrefixPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.13-dev/bin/python"])}); + let expected_3_12_1a3 = json!({"name": "Python","pythonExecutablePath": [join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1a3/bin/python"])],"category": "pyenv","version": "3.12.1a3","activatedRun": [pyenv_exe.clone(), "local", "3.12.1a3"],"envPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1a3"]),"sysPrefixPath": join_test_paths(&[home.as_str(), ".pyenv/versions/3.12.1a3/bin/python"])}); + assert_messages( + &[ + expected_manager, + expected_3_9_9, + expected_3_12_1, + expected_3_13_dev, + expected_3_12_1a3, + ], + &dispatcher, + ) +} + +// #[test] +// #[cfg(unix)] +// fn find_conda_exe_and_empty_envs() { +// use crate::common::{ +// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, +// test_file_path, +// }; +// use python_finder::conda; +// use serde_json::json; +// use std::collections::HashMap; +// let conda_dir = test_file_path(&["tests/unix/conda_without_envs"]); + +// let mut dispatcher = create_test_dispatcher(); +// let known = create_test_environment( +// HashMap::from([("PATH".to_string(), conda_dir.clone())]), +// Some("SOME_BOGUS_HOME_DIR".to_string()), +// Vec::new(), +// ); + +// conda::find_and_report(&mut dispatcher, &known); + +// let conda_exe = join_test_paths(&[conda_dir.clone().as_str(), "conda"]); +// let expected_json = json!({"executablePath":[conda_exe.clone()],"version":null}); +// assert_messages(&[expected_json], &dispatcher) +// } +// #[test] +// #[cfg(unix)] +// fn finds_two_conda_envs_from_txt() { +// use crate::common::{ +// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, +// test_file_path, +// }; +// use python_finder::conda; +// use serde_json::json; +// use std::collections::HashMap; +// use std::fs; + +// let conda_dir = test_file_path(&["tests/unix/conda"]); +// let conda_1 = join_test_paths(&[conda_dir.clone().as_str(), "envs/one"]); +// let conda_2 = join_test_paths(&[conda_dir.clone().as_str(), "envs/two"]); +// let _ = fs::write( +// "tests/unix/conda/.conda/environments.txt", +// format!("{}\n{}", conda_1.clone(), conda_2.clone()), +// ); + +// let mut dispatcher = create_test_dispatcher(); +// let known = create_test_environment( +// HashMap::from([("PATH".to_string(), conda_dir.clone())]), +// Some(conda_dir.clone()), +// Vec::new(), +// ); + +// conda::find_and_report(&mut dispatcher, &known); + +// let conda_exe = join_test_paths(&[conda_dir.clone().as_str(), "conda"]); +// let conda_1_exe = join_test_paths(&[conda_1.clone().as_str(), "python"]); +// let conda_2_exe = join_test_paths(&[conda_2.clone().as_str(), "python"]); + +// let expected_conda_env = json!({"executablePath":[conda_exe.clone()],"version":null}); +// let expected_conda_1 = json!({"name":"envs/one","pythonExecutablePath":[conda_1_exe.clone()],"category":"conda","version":"10.0.1","activatedRun":[conda_exe.clone(),"run","-n","envs/one","python"],"envPath":conda_1.clone()}); +// let expected_conda_2 = json!({"name":"envs/two","pythonExecutablePath":[conda_2_exe.clone()],"category":"conda","version":null,"activatedRun":[conda_exe.clone(),"run","-n","envs/two","python"],"envPath":conda_2.clone()}); +// assert_messages( +// &[expected_conda_env, expected_conda_1, expected_conda_2], +// &dispatcher, +// ) +// } diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1a3/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1a3/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.13-dev/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/3.13-dev/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.9.9/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/3.9.9/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/miniforge3-4.11.0-1/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/nogil-3.9.10/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/nogil-3.9.10/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/pypy3.10-7.3.14/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/pypy3.10-7.3.14/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/pyston-2.3.5/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/pyston-2.3.5/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/stacklets-3.7.5/bin/python b/native_locator/tests/unix/pyenv/.PYENV/versions/stacklets-3.7.5/bin/python new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv/opt/homebrew/bin/pyenv b/native_locator/tests/unix/pyenv/opt/homebrew/bin/pyenv new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/native_locator/tests/unix/pyenv_without_envs/opt/homebrew/bin/pyenv b/native_locator/tests/unix/pyenv_without_envs/opt/homebrew/bin/pyenv new file mode 100644 index 000000000000..e69de29bb2d1 From c60bcbd5e6ba6a460006e46080c7642531f50fcf Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 07:46:59 +1000 Subject: [PATCH 3/9] Remove dead code --- native_locator/tests/pyenv_test.rs | 67 ------------------------------ 1 file changed, 67 deletions(-) diff --git a/native_locator/tests/pyenv_test.rs b/native_locator/tests/pyenv_test.rs index 6f0eec940985..896fbe62a035 100644 --- a/native_locator/tests/pyenv_test.rs +++ b/native_locator/tests/pyenv_test.rs @@ -90,70 +90,3 @@ fn find_pyenv_envs() { &dispatcher, ) } - -// #[test] -// #[cfg(unix)] -// fn find_conda_exe_and_empty_envs() { -// use crate::common::{ -// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, -// test_file_path, -// }; -// use python_finder::conda; -// use serde_json::json; -// use std::collections::HashMap; -// let conda_dir = test_file_path(&["tests/unix/conda_without_envs"]); - -// let mut dispatcher = create_test_dispatcher(); -// let known = create_test_environment( -// HashMap::from([("PATH".to_string(), conda_dir.clone())]), -// Some("SOME_BOGUS_HOME_DIR".to_string()), -// Vec::new(), -// ); - -// conda::find_and_report(&mut dispatcher, &known); - -// let conda_exe = join_test_paths(&[conda_dir.clone().as_str(), "conda"]); -// let expected_json = json!({"executablePath":[conda_exe.clone()],"version":null}); -// assert_messages(&[expected_json], &dispatcher) -// } -// #[test] -// #[cfg(unix)] -// fn finds_two_conda_envs_from_txt() { -// use crate::common::{ -// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, -// test_file_path, -// }; -// use python_finder::conda; -// use serde_json::json; -// use std::collections::HashMap; -// use std::fs; - -// let conda_dir = test_file_path(&["tests/unix/conda"]); -// let conda_1 = join_test_paths(&[conda_dir.clone().as_str(), "envs/one"]); -// let conda_2 = join_test_paths(&[conda_dir.clone().as_str(), "envs/two"]); -// let _ = fs::write( -// "tests/unix/conda/.conda/environments.txt", -// format!("{}\n{}", conda_1.clone(), conda_2.clone()), -// ); - -// let mut dispatcher = create_test_dispatcher(); -// let known = create_test_environment( -// HashMap::from([("PATH".to_string(), conda_dir.clone())]), -// Some(conda_dir.clone()), -// Vec::new(), -// ); - -// conda::find_and_report(&mut dispatcher, &known); - -// let conda_exe = join_test_paths(&[conda_dir.clone().as_str(), "conda"]); -// let conda_1_exe = join_test_paths(&[conda_1.clone().as_str(), "python"]); -// let conda_2_exe = join_test_paths(&[conda_2.clone().as_str(), "python"]); - -// let expected_conda_env = json!({"executablePath":[conda_exe.clone()],"version":null}); -// let expected_conda_1 = json!({"name":"envs/one","pythonExecutablePath":[conda_1_exe.clone()],"category":"conda","version":"10.0.1","activatedRun":[conda_exe.clone(),"run","-n","envs/one","python"],"envPath":conda_1.clone()}); -// let expected_conda_2 = json!({"name":"envs/two","pythonExecutablePath":[conda_2_exe.clone()],"category":"conda","version":null,"activatedRun":[conda_exe.clone(),"run","-n","envs/two","python"],"envPath":conda_2.clone()}); -// assert_messages( -// &[expected_conda_env, expected_conda_1, expected_conda_2], -// &dispatcher, -// ) -// } From 2c43fe57aabd2da980a7f3b55db0d6ba21a986db Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:37:39 +1000 Subject: [PATCH 4/9] wip --- .github/workflows/pr-check.yml | 996 ++++++++++++++--------------- native_locator/src/pyenv.rs | 12 +- native_locator/tests/pyenv_test.rs | 78 +-- 3 files changed, 548 insertions(+), 538 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 19556a38e30c..65b2058ca659 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -20,296 +20,296 @@ env: special-working-directory-relative: 'path with spaces' jobs: - build-vsix: - name: Create VSIX - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Build VSIX - uses: ./.github/actions/build-vsix - with: - node_version: ${{ env.NODE_VERSION}} - vsix_name: ${{ env.VSIX_NAME }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Lint - uses: ./.github/actions/lint - with: - node_version: ${{ env.NODE_VERSION }} - - check-types: - name: Check Python types - runs-on: ubuntu-latest - steps: - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./python_files/lib/python --no-cache-dir --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './python_files/jedilsp_requirements/requirements.txt' - options: '-t ./python_files/lib/jedilsp --no-cache-dir --implementation py' - - - name: Install other Python requirements - run: | - python -m pip install --upgrade -r build/test-requirements.txt - - - name: Run Pyright - uses: jakebailey/pyright-action@v2 - with: - version: 1.1.308 - working-directory: 'python_files' - - python-tests: - name: Python Tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: ${{ env.special-working-directory }} - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. - os: [ubuntu-latest, windows-latest] - # Run the tests on the oldest and most recent versions of Python. - python: ['3.8', '3.x'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release - pytest-version: ['pytest', 'pytest@pre-release', 'pytest==6.2.0'] - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: ${{ env.special-working-directory-relative }} - - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Install specific pytest version - if: matrix.pytest-version == 'pytest@pre-release' - run: | - python -m pip install --pre pytest - - - name: Install specific pytest version - if: matrix.pytest-version != 'pytest@pre-release' - run: | - python -m pip install "${{ matrix.pytest-version }}" - - - name: Install specific pytest version - run: python -m pytest --version - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' - options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py' - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Run Python unit tests - run: python python_files/tests/run_all.py - - tests: - name: Tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - defaults: - run: - working-directory: ${{ env.special-working-directory }} - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. - os: [ubuntu-latest, windows-latest] - # Run the tests on the oldest and most recent versions of Python. - python: ['3.x'] - test-suite: [ts-unit, venv, single-workspace, debugger, functional] - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - path: ${{ env.special-working-directory-relative }} - - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Localization - run: npx @vscode/l10n-dev@latest export ./src - - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Upgrade Pip - run: python -m pip install -U pip - - # For faster/better builds of sdists. - - name: Install build pre-requisite - run: python -m pip install wheel nox - - - name: Install Python Extension dependencies (jedi, etc.) - run: nox --session install_python_libs - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - if: matrix.test-suite == 'functional' - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - if: matrix.test-suite == 'venv' - run: | - # 1. For `*.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION - run: | - echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV - echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV - shell: bash - if: matrix.test-suite != 'ts-unit' - - # Run TypeScript unit tests only for Python 3.X. - - name: Run TypeScript unit tests - run: npm run test:unittests - if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'venv' - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'single-workspace' - - - name: Run debugger tests - env: - CI_PYTHON_VERSION: ${{ matrix.python }} - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testDebugger - working-directory: ${{ env.special-working-directory }} - if: matrix.test-suite == 'debugger' - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - run: npm run test:functional - if: matrix.test-suite == 'functional' +# build-vsix: +# name: Create VSIX +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Build VSIX +# uses: ./.github/actions/build-vsix +# with: +# node_version: ${{ env.NODE_VERSION}} +# vsix_name: ${{ env.VSIX_NAME }} +# artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} + +# lint: +# name: Lint +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Lint +# uses: ./.github/actions/lint +# with: +# node_version: ${{ env.NODE_VERSION }} + +# check-types: +# name: Check Python types +# runs-on: ubuntu-latest +# steps: +# - name: Use Python ${{ env.PYTHON_VERSION }} +# uses: actions/setup-python@v5 +# with: +# python-version: ${{ env.PYTHON_VERSION }} + +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Install base Python requirements +# uses: brettcannon/pip-secure-install@v1 +# with: +# options: '-t ./python_files/lib/python --no-cache-dir --implementation py' + +# - name: Install Jedi requirements +# uses: brettcannon/pip-secure-install@v1 +# with: +# requirements-file: './python_files/jedilsp_requirements/requirements.txt' +# options: '-t ./python_files/lib/jedilsp --no-cache-dir --implementation py' + +# - name: Install other Python requirements +# run: | +# python -m pip install --upgrade -r build/test-requirements.txt + +# - name: Run Pyright +# uses: jakebailey/pyright-action@v2 +# with: +# version: 1.1.308 +# working-directory: 'python_files' + +# python-tests: +# name: Python Tests +# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. +# runs-on: ${{ matrix.os }} +# defaults: +# run: +# working-directory: ${{ env.special-working-directory }} +# strategy: +# fail-fast: false +# matrix: +# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, +# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. +# os: [ubuntu-latest, windows-latest] +# # Run the tests on the oldest and most recent versions of Python. +# python: ['3.8', '3.x'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release +# pytest-version: ['pytest', 'pytest@pre-release', 'pytest==6.2.0'] + +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# path: ${{ env.special-working-directory-relative }} + +# - name: Use Python ${{ matrix.python }} +# uses: actions/setup-python@v5 +# with: +# python-version: ${{ matrix.python }} + +# - name: Install specific pytest version +# if: matrix.pytest-version == 'pytest@pre-release' +# run: | +# python -m pip install --pre pytest + +# - name: Install specific pytest version +# if: matrix.pytest-version != 'pytest@pre-release' +# run: | +# python -m pip install "${{ matrix.pytest-version }}" + +# - name: Install specific pytest version +# run: python -m pytest --version +# - name: Install base Python requirements +# uses: brettcannon/pip-secure-install@v1 +# with: +# requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' +# options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py' + +# - name: Install test requirements +# run: python -m pip install --upgrade -r build/test-requirements.txt + +# - name: Run Python unit tests +# run: python python_files/tests/run_all.py + +# tests: +# name: Tests +# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. +# runs-on: ${{ matrix.os }} +# defaults: +# run: +# working-directory: ${{ env.special-working-directory }} +# strategy: +# fail-fast: false +# matrix: +# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, +# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. +# os: [ubuntu-latest, windows-latest] +# # Run the tests on the oldest and most recent versions of Python. +# python: ['3.x'] +# test-suite: [ts-unit, venv, single-workspace, debugger, functional] + +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# path: ${{ env.special-working-directory-relative }} + +# - name: Install Node +# uses: actions/setup-node@v4 +# with: +# node-version: ${{ env.NODE_VERSION }} +# cache: 'npm' +# cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json + +# - name: Install dependencies (npm ci) +# run: npm ci + +# - name: Compile +# run: npx gulp prePublishNonBundle + +# - name: Localization +# run: npx @vscode/l10n-dev@latest export ./src + +# - name: Use Python ${{ matrix.python }} +# uses: actions/setup-python@v5 +# with: +# python-version: ${{ matrix.python }} + +# - name: Upgrade Pip +# run: python -m pip install -U pip + +# # For faster/better builds of sdists. +# - name: Install build pre-requisite +# run: python -m pip install wheel nox + +# - name: Install Python Extension dependencies (jedi, etc.) +# run: nox --session install_python_libs + +# - name: Install test requirements +# run: python -m pip install --upgrade -r build/test-requirements.txt + +# - name: Install functional test requirements +# run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt +# if: matrix.test-suite == 'functional' + +# - name: Prepare pipenv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# if: matrix.test-suite == 'venv' +# run: | +# python -m pip install pipenv +# python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath + +# - name: Prepare poetry for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# shell: pwsh +# if: matrix.test-suite == 'venv' +# run: | +# python -m pip install poetry +# Move-Item -Path ".\build\ci\pyproject.toml" -Destination . +# poetry env use python + +# - name: Prepare virtualenv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# if: matrix.test-suite == 'venv' +# run: | +# python -m pip install virtualenv +# python -m virtualenv .virtualenv/ +# if ('${{ matrix.os }}' -match 'windows-latest') { +# & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath +# } else { +# & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath +# } + +# - name: Prepare venv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) +# run: | +# python -m venv .venv +# if ('${{ matrix.os }}' -match 'windows-latest') { +# & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath +# } else { +# & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath +# } + +# - name: Prepare conda for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# if: matrix.test-suite == 'venv' +# run: | +# # 1. For `*.testvirtualenvs.test.ts` +# if ('${{ matrix.os }}' -match 'windows-latest') { +# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe +# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda +# } else{ +# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python +# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda +# } +# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath +# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath +# & $condaExecPath init --all + +# - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION +# run: | +# echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV +# echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV +# shell: bash +# if: matrix.test-suite != 'ts-unit' + +# # Run TypeScript unit tests only for Python 3.X. +# - name: Run TypeScript unit tests +# run: npm run test:unittests +# if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) + +# # The virtual environment based tests use the `testSingleWorkspace` set of tests +# # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, +# # which is set in the "Prepare environment for venv tests" step. +# # We also use a third-party GitHub Action to install xvfb on Linux, +# # run tests and then clean up the process once the tests ran. +# # See https://github.com/GabrielBB/xvfb-action +# - name: Run venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# CI_PYTHON_VERSION: ${{ matrix.python }} +# uses: GabrielBB/xvfb-action@v1.6 +# with: +# run: npm run testSingleWorkspace +# working-directory: ${{ env.special-working-directory }} +# if: matrix.test-suite == 'venv' + +# - name: Run single-workspace tests +# env: +# CI_PYTHON_VERSION: ${{ matrix.python }} +# uses: GabrielBB/xvfb-action@v1.6 +# with: +# run: npm run testSingleWorkspace +# working-directory: ${{ env.special-working-directory }} +# if: matrix.test-suite == 'single-workspace' + +# - name: Run debugger tests +# env: +# CI_PYTHON_VERSION: ${{ matrix.python }} +# uses: GabrielBB/xvfb-action@v1.6 +# with: +# run: npm run testDebugger +# working-directory: ${{ env.special-working-directory }} +# if: matrix.test-suite == 'debugger' + +# # Run TypeScript functional tests +# - name: Run TypeScript functional tests +# run: npm run test:functional +# if: matrix.test-suite == 'functional' native-tests: name: Native Tests @@ -332,213 +332,213 @@ jobs: path: ${{ env.special-working-directory-relative }} - name: Native Locator tests - run: cargo test + run: cargo test --nocapture working-directory: ${{ env.special-working-directory }}/native_locator - smoke-tests: - name: Smoke tests - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - needs: [build-vsix] - strategy: - fail-fast: false - matrix: - # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, - # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. - os: [ubuntu-latest, windows-latest] - steps: - # Need the source to have the tests available. - - name: Checkout - uses: actions/checkout@v4 - - - name: Smoke tests - uses: ./.github/actions/smoke-tests - with: - node_version: ${{ env.NODE_VERSION }} - artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - - ### Coverage run - coverage: - name: Coverage - # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Only run coverage on linux for PRs - os: [ubuntu-latest] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install dependencies (npm ci) - run: npm ci - - - name: Compile - run: npx gulp prePublishNonBundle - - - name: Localization - run: npx @vscode/l10n-dev@latest export ./src - - - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - cache: 'pip' - cache-dependency-path: | - requirements.txt - python_files/jedilsp_requirements/requirements.txt - build/test-requirements.txt - build/functional-test-requirements.txt - - - name: Install base Python requirements - uses: brettcannon/pip-secure-install@v1 - with: - options: '-t ./python_files/lib/python --implementation py' - - - name: Install Jedi requirements - uses: brettcannon/pip-secure-install@v1 - with: - requirements-file: './python_files/jedilsp_requirements/requirements.txt' - options: '-t ./python_files/lib/jedilsp --implementation py' - - - name: Install test requirements - run: python -m pip install --upgrade -r build/test-requirements.txt - - - name: Install functional test requirements - run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - - - name: Prepare pipenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install pipenv - python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - - - name: Prepare poetry for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - shell: pwsh - run: | - python -m pip install poetry - Move-Item -Path ".\build\ci\pyproject.toml" -Destination . - poetry env use python - - - name: Prepare virtualenv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m pip install virtualenv - python -m virtualenv .virtualenv/ - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } else { - & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath - } - - - name: Prepare venv for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - python -m venv .venv - if ('${{ matrix.os }}' -match 'windows-latest') { - & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } else { - & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath - } - - - name: Prepare conda for venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' - shell: pwsh - run: | - # 1. For `*.testvirtualenvs.test.ts` - if ('${{ matrix.os }}' -match 'windows-latest') { - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda - } else{ - $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python - $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda - } - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath - & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath - & $condaExecPath init --all - - - name: Run TypeScript unit tests - run: npm run test:unittests:cover - - - name: Run Python unit tests - run: | - python python_files/tests/run_all.py - - # The virtual environment based tests use the `testSingleWorkspace` set of tests - # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, - # which is set in the "Prepare environment for venv tests" step. - # We also use a third-party GitHub Action to install xvfb on Linux, - # run tests and then clean up the process once the tests ran. - # See https://github.com/GabrielBB/xvfb-action - - name: Run venv tests - env: - TEST_FILES_SUFFIX: testvirtualenvs - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - - name: Run single-workspace tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - uses: GabrielBB/xvfb-action@v1.6 - with: - run: npm run testSingleWorkspace:cover - - # Enable these tests when coverage is setup for multiroot workspace tests - # - name: Run multi-workspace tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testMultiWorkspace:cover - - # Enable these tests when coverage is setup for debugger tests - # - name: Run debugger tests - # env: - # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - # CI_DISABLE_AUTO_SELECTION: 1 - # uses: GabrielBB/xvfb-action@v1.6 - # with: - # run: npm run testDebugger:cover - - # Run TypeScript functional tests - - name: Run TypeScript functional tests - env: - CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} - CI_DISABLE_AUTO_SELECTION: 1 - run: npm run test:functional:cover - - - name: Generate coverage reports - run: npm run test:cover:report - - - name: Upload HTML report - uses: actions/upload-artifact@v4 - with: - name: ${{ runner.os }}-coverage-report-html - path: ./coverage - retention-days: 1 +# smoke-tests: +# name: Smoke tests +# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. +# runs-on: ${{ matrix.os }} +# needs: [build-vsix] +# strategy: +# fail-fast: false +# matrix: +# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, +# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. +# os: [ubuntu-latest, windows-latest] +# steps: +# # Need the source to have the tests available. +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Smoke tests +# uses: ./.github/actions/smoke-tests +# with: +# node_version: ${{ env.NODE_VERSION }} +# artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} + +# ### Coverage run +# coverage: +# name: Coverage +# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. +# runs-on: ${{ matrix.os }} +# strategy: +# fail-fast: false +# matrix: +# # Only run coverage on linux for PRs +# os: [ubuntu-latest] + +# steps: +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Install Node +# uses: actions/setup-node@v4 +# with: +# node-version: ${{ env.NODE_VERSION }} +# cache: 'npm' + +# - name: Install dependencies (npm ci) +# run: npm ci + +# - name: Compile +# run: npx gulp prePublishNonBundle + +# - name: Localization +# run: npx @vscode/l10n-dev@latest export ./src + +# - name: Use Python ${{ env.PYTHON_VERSION }} +# uses: actions/setup-python@v5 +# with: +# python-version: ${{ env.PYTHON_VERSION }} +# cache: 'pip' +# cache-dependency-path: | +# requirements.txt +# python_files/jedilsp_requirements/requirements.txt +# build/test-requirements.txt +# build/functional-test-requirements.txt + +# - name: Install base Python requirements +# uses: brettcannon/pip-secure-install@v1 +# with: +# options: '-t ./python_files/lib/python --implementation py' + +# - name: Install Jedi requirements +# uses: brettcannon/pip-secure-install@v1 +# with: +# requirements-file: './python_files/jedilsp_requirements/requirements.txt' +# options: '-t ./python_files/lib/jedilsp --implementation py' + +# - name: Install test requirements +# run: python -m pip install --upgrade -r build/test-requirements.txt + +# - name: Install functional test requirements +# run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt + +# - name: Prepare pipenv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# run: | +# python -m pip install pipenv +# python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath + +# - name: Prepare poetry for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# shell: pwsh +# run: | +# python -m pip install poetry +# Move-Item -Path ".\build\ci\pyproject.toml" -Destination . +# poetry env use python + +# - name: Prepare virtualenv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# run: | +# python -m pip install virtualenv +# python -m virtualenv .virtualenv/ +# if ('${{ matrix.os }}' -match 'windows-latest') { +# & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath +# } else { +# & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath +# } + +# - name: Prepare venv for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# run: | +# python -m venv .venv +# if ('${{ matrix.os }}' -match 'windows-latest') { +# & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath +# } else { +# & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath +# } + +# - name: Prepare conda for venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' +# shell: pwsh +# run: | +# # 1. For `*.testvirtualenvs.test.ts` +# if ('${{ matrix.os }}' -match 'windows-latest') { +# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe +# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda +# } else{ +# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python +# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda +# } +# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath +# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath +# & $condaExecPath init --all + +# - name: Run TypeScript unit tests +# run: npm run test:unittests:cover + +# - name: Run Python unit tests +# run: | +# python python_files/tests/run_all.py + +# # The virtual environment based tests use the `testSingleWorkspace` set of tests +# # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, +# # which is set in the "Prepare environment for venv tests" step. +# # We also use a third-party GitHub Action to install xvfb on Linux, +# # run tests and then clean up the process once the tests ran. +# # See https://github.com/GabrielBB/xvfb-action +# - name: Run venv tests +# env: +# TEST_FILES_SUFFIX: testvirtualenvs +# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} +# CI_DISABLE_AUTO_SELECTION: 1 +# uses: GabrielBB/xvfb-action@v1.6 +# with: +# run: npm run testSingleWorkspace:cover + +# - name: Run single-workspace tests +# env: +# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} +# CI_DISABLE_AUTO_SELECTION: 1 +# uses: GabrielBB/xvfb-action@v1.6 +# with: +# run: npm run testSingleWorkspace:cover + +# # Enable these tests when coverage is setup for multiroot workspace tests +# # - name: Run multi-workspace tests +# # env: +# # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} +# # CI_DISABLE_AUTO_SELECTION: 1 +# # uses: GabrielBB/xvfb-action@v1.6 +# # with: +# # run: npm run testMultiWorkspace:cover + +# # Enable these tests when coverage is setup for debugger tests +# # - name: Run debugger tests +# # env: +# # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} +# # CI_DISABLE_AUTO_SELECTION: 1 +# # uses: GabrielBB/xvfb-action@v1.6 +# # with: +# # run: npm run testDebugger:cover + +# # Run TypeScript functional tests +# - name: Run TypeScript functional tests +# env: +# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} +# CI_DISABLE_AUTO_SELECTION: 1 +# run: npm run test:functional:cover + +# - name: Generate coverage reports +# run: npm run test:cover:report + +# - name: Upload HTML report +# uses: actions/upload-artifact@v4 +# with: +# name: ${{ runner.os }}-coverage-report-html +# path: ./coverage +# retention-days: 1 diff --git a/native_locator/src/pyenv.rs b/native_locator/src/pyenv.rs index 8e7a734a297d..24051bdb5b89 100644 --- a/native_locator/src/pyenv.rs +++ b/native_locator/src/pyenv.rs @@ -22,6 +22,7 @@ fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { #[cfg(unix)] fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { + println!("\nget_home_pyenv_dir"); let home = environment.get_user_home()?; PathBuf::from(home) .join(".pyenv") @@ -33,10 +34,13 @@ fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { fn get_binary_from_known_paths(environment: &impl known::Environment) -> Option { for known_path in environment.get_know_global_search_locations() { let bin = known_path.join("pyenv"); + println!("\nget_binary_from_known_paths {:?}", bin); if bin.exists() { + println!("\nget_binary_from_known_paths {:?} found", bin); return bin.into_os_string().into_string().ok(); } } + println!("\nget_binary_from_known_paths NOT found"); None } @@ -47,6 +51,7 @@ fn get_pyenv_dir(environment: &impl known::Environment) -> Option { // If the interpreter path starts with the path to the pyenv folder, then it is a pyenv environment. // See https://github.com/pyenv/pyenv#locating-the-python-installation for general usage, // And https://github.com/pyenv-win/pyenv-win for Windows specifics. + println!("\nget_pyenv_dir"); match environment.get_env_var("PYENV_ROOT".to_string()) { Some(dir) => Some(dir), @@ -61,6 +66,7 @@ fn get_pyenv_binary(environment: &impl known::Environment) -> Option { let dir = get_pyenv_dir(environment)?; let exe = PathBuf::from(dir).join("bin").join("pyenv"); if fs::metadata(&exe).is_ok() { + println!("\nget_pyenv_binary FOUND"); exe.into_os_string().into_string().ok() } else { get_binary_from_known_paths(environment) @@ -69,6 +75,7 @@ fn get_pyenv_binary(environment: &impl known::Environment) -> Option { fn get_pyenv_version(folder_name: String) -> Option { // Stable Versions = like 3.10.10 + println!("\nget_pyenv_version for {:?}", folder_name); let python_regex = Regex::new(r"^(\d+\.\d+\.\d+)$").unwrap(); match python_regex.captures(&folder_name) { Some(captures) => match captures.get(1) { @@ -123,13 +130,16 @@ pub fn find_and_report( if let Ok(path) = entry { let path = path.path(); if path.is_dir() { + println!("\nfind_and_report for {:?}", path); if let Some(executable) = find_python_binary_path(&path) { + println!("\nfind_and_report found binary for {:?}", path); let version = - get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); + get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); // If we cannot extract version, this isn't a valid pyenv environment. // Or its one that we're not interested in. if version.is_none() { + println!("\nfind_and_report found binary for {:?} and no version", path); continue; } let env_path = path.to_string_lossy().to_string(); diff --git a/native_locator/tests/pyenv_test.rs b/native_locator/tests/pyenv_test.rs index 896fbe62a035..b8d05d19451c 100644 --- a/native_locator/tests/pyenv_test.rs +++ b/native_locator/tests/pyenv_test.rs @@ -3,52 +3,52 @@ mod common; -#[test] -#[cfg(unix)] -fn does_not_find_any_pyenv_envs() { - use crate::common::{create_test_dispatcher, create_test_environment}; - use python_finder::pyenv; - use std::collections::HashMap; +// #[test] +// #[cfg(unix)] +// fn does_not_find_any_pyenv_envs() { +// use crate::common::{create_test_dispatcher, create_test_environment}; +// use python_finder::pyenv; +// use std::collections::HashMap; - let mut dispatcher = create_test_dispatcher(); - let known = create_test_environment( - HashMap::new(), - Some("SOME_BOGUS_HOME_DIR".to_string()), - Vec::new(), - ); +// let mut dispatcher = create_test_dispatcher(); +// let known = create_test_environment( +// HashMap::new(), +// Some("SOME_BOGUS_HOME_DIR".to_string()), +// Vec::new(), +// ); - pyenv::find_and_report(&mut dispatcher, &known); +// pyenv::find_and_report(&mut dispatcher, &known); - assert_eq!(dispatcher.messages.len(), 0); -} +// assert_eq!(dispatcher.messages.len(), 0); +// } -#[test] -#[cfg(unix)] -fn does_not_find_any_pyenv_envs_even_with_pyenv_installed() { - use crate::common::{ - assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, - test_file_path, - }; - use python_finder::pyenv; - use serde_json::json; - use std::{collections::HashMap, path::PathBuf}; +// #[test] +// #[cfg(unix)] +// fn does_not_find_any_pyenv_envs_even_with_pyenv_installed() { +// use crate::common::{ +// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, +// test_file_path, +// }; +// use python_finder::pyenv; +// use serde_json::json; +// use std::{collections::HashMap, path::PathBuf}; - let mut dispatcher = create_test_dispatcher(); - let home = test_file_path(&["tests", "unix", "pyenv_without_envs"]); - let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); - let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); - let known = create_test_environment( - HashMap::new(), - Some(home.clone()), - vec![PathBuf::from(homebrew_bin)], - ); +// let mut dispatcher = create_test_dispatcher(); +// let home = test_file_path(&["tests", "unix", "pyenv_without_envs"]); +// let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); +// let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); +// let known = create_test_environment( +// HashMap::new(), +// Some(home.clone()), +// vec![PathBuf::from(homebrew_bin)], +// ); - pyenv::find_and_report(&mut dispatcher, &known); +// pyenv::find_and_report(&mut dispatcher, &known); - assert_eq!(dispatcher.messages.len(), 1); - let expected_json = json!({"executablePath":[pyenv_exe],"version":null}); - assert_messages(&[expected_json], &dispatcher) -} +// assert_eq!(dispatcher.messages.len(), 1); +// let expected_json = json!({"executablePath":[pyenv_exe],"version":null}); +// assert_messages(&[expected_json], &dispatcher) +// } #[test] #[cfg(unix)] From 312845d1d5ec7ded507dcbb82a92f3129465621a Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:42:47 +1000 Subject: [PATCH 5/9] oops --- .github/workflows/pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 65b2058ca659..aade48dd1751 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -332,7 +332,7 @@ jobs: path: ${{ env.special-working-directory-relative }} - name: Native Locator tests - run: cargo test --nocapture + run: cargo test -- --nocapture working-directory: ${{ env.special-working-directory }}/native_locator # smoke-tests: From fa3a53e155fd66f76dd3e14040546a7bab947af7 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:44:47 +1000 Subject: [PATCH 6/9] wip --- native_locator/src/pyenv.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native_locator/src/pyenv.rs b/native_locator/src/pyenv.rs index 24051bdb5b89..f48380893e99 100644 --- a/native_locator/src/pyenv.rs +++ b/native_locator/src/pyenv.rs @@ -116,6 +116,7 @@ pub fn find_and_report( dispatcher.report_environment_manager(messaging::EnvManager::new(vec![pyenv_binary], None)); } + println!("\nfind_and_report for pyenv_dir {:?}", pyenv_dir); let versions_dir = PathBuf::from(&pyenv_dir) .join("versions") .into_os_string() @@ -126,6 +127,7 @@ pub fn find_and_report( Some(binary) => binary, None => "pyenv".to_string(), }; + println!("\nfind_and_report for versions {:?}", versions_dir); for entry in fs::read_dir(&versions_dir).ok()? { if let Ok(path) = entry { let path = path.path(); From e15505a29e83de503ee985acc1a0f20b66dc3fa8 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:48:10 +1000 Subject: [PATCH 7/9] Fixed case --- .../unix/pyenv/{.PYENV => .pyenvx}/versions/3.12.1/bin/python | 0 .../unix/pyenv/{.PYENV => .pyenvx}/versions/3.12.1a3/bin/python | 0 .../unix/pyenv/{.PYENV => .pyenvx}/versions/3.13-dev/bin/python | 0 .../unix/pyenv/{.PYENV => .pyenvx}/versions/3.9.9/bin/python | 0 .../pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/bin/python | 0 .../versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/anaconda3-2021.04/bin/python | 0 .../versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge/bin/python | 0 .../versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/mambaforge/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/miniconda-latest/bin/python | 0 .../versions/miniconda-latest/miniforge3-4.11.0-1/bin/python | 0 .../versions/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/miniconda3-3.10.1/bin/python | 0 .../versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/miniconda3-4.0.5/bin/python | 0 .../versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python | 0 .../{.PYENV => .pyenvx}/versions/miniforge3-4.11.0-1/bin/python | 0 .../pyenv/{.PYENV => .pyenvx}/versions/nogil-3.9.10/bin/python | 0 .../pyenv/{.PYENV => .pyenvx}/versions/pypy3.10-7.3.14/bin/python | 0 .../pyenv/{.PYENV => .pyenvx}/versions/pyston-2.3.5/bin/python | 0 .../pyenv/{.PYENV => .pyenvx}/versions/stacklets-3.7.5/bin/python | 0 41 files changed, 0 insertions(+), 0 deletions(-) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/3.12.1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/3.12.1a3/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/3.13-dev/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/3.9.9/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/mambaforge/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda-latest/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-3.10.1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-4.0.5/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/nogil-3.9.10/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/pypy3.10-7.3.14/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/pyston-2.3.5/bin/python (100%) rename native_locator/tests/unix/pyenv/{.PYENV => .pyenvx}/versions/stacklets-3.7.5/bin/python (100%) diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1a3/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1a3/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/3.12.1a3/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1a3/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.13-dev/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/3.13-dev/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/3.13-dev/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/3.13-dev/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/3.9.9/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/3.9.9/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/3.9.9/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/3.9.9/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/mambaforge/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/nogil-3.9.10/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/nogil-3.9.10/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/nogil-3.9.10/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/nogil-3.9.10/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/pypy3.10-7.3.14/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/pypy3.10-7.3.14/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/pypy3.10-7.3.14/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/pypy3.10-7.3.14/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/pyston-2.3.5/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/pyston-2.3.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/pyston-2.3.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/pyston-2.3.5/bin/python diff --git a/native_locator/tests/unix/pyenv/.PYENV/versions/stacklets-3.7.5/bin/python b/native_locator/tests/unix/pyenv/.pyenvx/versions/stacklets-3.7.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.PYENV/versions/stacklets-3.7.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenvx/versions/stacklets-3.7.5/bin/python From 3eb09180058f634f8819ca56dc0435a461bedd56 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:48:26 +1000 Subject: [PATCH 8/9] Fixes --- .../unix/pyenv/{.pyenvx => .pyenv}/versions/3.12.1/bin/python | 0 .../unix/pyenv/{.pyenvx => .pyenv}/versions/3.12.1a3/bin/python | 0 .../unix/pyenv/{.pyenvx => .pyenv}/versions/3.13-dev/bin/python | 0 .../unix/pyenv/{.pyenvx => .pyenv}/versions/3.9.9/bin/python | 0 .../pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/bin/python | 0 .../versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/anaconda3-2021.04/bin/python | 0 .../versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/mambaforge-4.10.1-4/bin/python | 0 .../mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python | 0 .../unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge/bin/python | 0 .../versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../versions/mambaforge/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/miniconda-latest/bin/python | 0 .../versions/miniconda-latest/miniforge3-4.11.0-1/bin/python | 0 .../versions/miniconda3-3.10-22.11.1-1/bin/python | 0 .../miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/miniconda3-3.10.1/bin/python | 0 .../versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/miniconda3-4.0.5/bin/python | 0 .../versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python | 0 .../{.pyenvx => .pyenv}/versions/miniforge3-4.11.0-1/bin/python | 0 .../pyenv/{.pyenvx => .pyenv}/versions/nogil-3.9.10/bin/python | 0 .../pyenv/{.pyenvx => .pyenv}/versions/pypy3.10-7.3.14/bin/python | 0 .../pyenv/{.pyenvx => .pyenv}/versions/pyston-2.3.5/bin/python | 0 .../pyenv/{.pyenvx => .pyenv}/versions/stacklets-3.7.5/bin/python | 0 41 files changed, 0 insertions(+), 0 deletions(-) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/3.12.1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/3.12.1a3/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/3.13-dev/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/3.9.9/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge-4.10.1-4/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/mambaforge/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda-latest/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-3.10-22.11.1-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-3.10.1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-4.0.5/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/miniforge3-4.11.0-1/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/nogil-3.9.10/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/pypy3.10-7.3.14/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/pyston-2.3.5/bin/python (100%) rename native_locator/tests/unix/pyenv/{.pyenvx => .pyenv}/versions/stacklets-3.7.5/bin/python (100%) diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/3.12.1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/3.12.1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1a3/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/3.12.1a3/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/3.12.1a3/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/3.12.1a3/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/3.13-dev/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/3.13-dev/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/3.13-dev/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/3.13-dev/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/3.9.9/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/3.9.9/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/3.9.9/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/3.9.9/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda-4.0.0/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/anaconda3-2021.04/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge-4.10.1-4/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/mambaforge/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/mambaforge/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda-latest/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda-latest/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda-latest/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10-22.11.1-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10-22.11.1-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10-22.11.1-1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10.1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10.1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-3.10.1/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-4.0.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-4.0.5/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniconda3-4.0.5/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/miniforge3-4.11.0-1/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/miniforge3-4.11.0-1/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/miniforge3-4.11.0-1/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/miniforge3-4.11.0-1/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/nogil-3.9.10/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/nogil-3.9.10/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/nogil-3.9.10/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/nogil-3.9.10/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/pypy3.10-7.3.14/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/pypy3.10-7.3.14/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/pypy3.10-7.3.14/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/pypy3.10-7.3.14/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/pyston-2.3.5/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/pyston-2.3.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/pyston-2.3.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/pyston-2.3.5/bin/python diff --git a/native_locator/tests/unix/pyenv/.pyenvx/versions/stacklets-3.7.5/bin/python b/native_locator/tests/unix/pyenv/.pyenv/versions/stacklets-3.7.5/bin/python similarity index 100% rename from native_locator/tests/unix/pyenv/.pyenvx/versions/stacklets-3.7.5/bin/python rename to native_locator/tests/unix/pyenv/.pyenv/versions/stacklets-3.7.5/bin/python From a6e6a1db1cf26c6d95f5a5d354d43811d4d0113d Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 8 May 2024 09:50:07 +1000 Subject: [PATCH 9/9] Revert unwanted changes --- .github/workflows/pr-check.yml | 994 ++++++++++++++--------------- native_locator/src/pyenv.rs | 14 +- native_locator/tests/pyenv_test.rs | 78 +-- 3 files changed, 537 insertions(+), 549 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index aade48dd1751..ed9b10e29e2b 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -20,296 +20,296 @@ env: special-working-directory-relative: 'path with spaces' jobs: -# build-vsix: -# name: Create VSIX -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Build VSIX -# uses: ./.github/actions/build-vsix -# with: -# node_version: ${{ env.NODE_VERSION}} -# vsix_name: ${{ env.VSIX_NAME }} -# artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - -# lint: -# name: Lint -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Lint -# uses: ./.github/actions/lint -# with: -# node_version: ${{ env.NODE_VERSION }} - -# check-types: -# name: Check Python types -# runs-on: ubuntu-latest -# steps: -# - name: Use Python ${{ env.PYTHON_VERSION }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ env.PYTHON_VERSION }} - -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Install base Python requirements -# uses: brettcannon/pip-secure-install@v1 -# with: -# options: '-t ./python_files/lib/python --no-cache-dir --implementation py' - -# - name: Install Jedi requirements -# uses: brettcannon/pip-secure-install@v1 -# with: -# requirements-file: './python_files/jedilsp_requirements/requirements.txt' -# options: '-t ./python_files/lib/jedilsp --no-cache-dir --implementation py' - -# - name: Install other Python requirements -# run: | -# python -m pip install --upgrade -r build/test-requirements.txt - -# - name: Run Pyright -# uses: jakebailey/pyright-action@v2 -# with: -# version: 1.1.308 -# working-directory: 'python_files' - -# python-tests: -# name: Python Tests -# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. -# runs-on: ${{ matrix.os }} -# defaults: -# run: -# working-directory: ${{ env.special-working-directory }} -# strategy: -# fail-fast: false -# matrix: -# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, -# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. -# os: [ubuntu-latest, windows-latest] -# # Run the tests on the oldest and most recent versions of Python. -# python: ['3.8', '3.x'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release -# pytest-version: ['pytest', 'pytest@pre-release', 'pytest==6.2.0'] - -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# path: ${{ env.special-working-directory-relative }} - -# - name: Use Python ${{ matrix.python }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ matrix.python }} - -# - name: Install specific pytest version -# if: matrix.pytest-version == 'pytest@pre-release' -# run: | -# python -m pip install --pre pytest - -# - name: Install specific pytest version -# if: matrix.pytest-version != 'pytest@pre-release' -# run: | -# python -m pip install "${{ matrix.pytest-version }}" - -# - name: Install specific pytest version -# run: python -m pytest --version -# - name: Install base Python requirements -# uses: brettcannon/pip-secure-install@v1 -# with: -# requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' -# options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py' - -# - name: Install test requirements -# run: python -m pip install --upgrade -r build/test-requirements.txt - -# - name: Run Python unit tests -# run: python python_files/tests/run_all.py - -# tests: -# name: Tests -# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. -# runs-on: ${{ matrix.os }} -# defaults: -# run: -# working-directory: ${{ env.special-working-directory }} -# strategy: -# fail-fast: false -# matrix: -# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, -# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. -# os: [ubuntu-latest, windows-latest] -# # Run the tests on the oldest and most recent versions of Python. -# python: ['3.x'] -# test-suite: [ts-unit, venv, single-workspace, debugger, functional] - -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# path: ${{ env.special-working-directory-relative }} - -# - name: Install Node -# uses: actions/setup-node@v4 -# with: -# node-version: ${{ env.NODE_VERSION }} -# cache: 'npm' -# cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json - -# - name: Install dependencies (npm ci) -# run: npm ci - -# - name: Compile -# run: npx gulp prePublishNonBundle - -# - name: Localization -# run: npx @vscode/l10n-dev@latest export ./src - -# - name: Use Python ${{ matrix.python }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ matrix.python }} - -# - name: Upgrade Pip -# run: python -m pip install -U pip - -# # For faster/better builds of sdists. -# - name: Install build pre-requisite -# run: python -m pip install wheel nox - -# - name: Install Python Extension dependencies (jedi, etc.) -# run: nox --session install_python_libs - -# - name: Install test requirements -# run: python -m pip install --upgrade -r build/test-requirements.txt - -# - name: Install functional test requirements -# run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt -# if: matrix.test-suite == 'functional' - -# - name: Prepare pipenv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# if: matrix.test-suite == 'venv' -# run: | -# python -m pip install pipenv -# python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - -# - name: Prepare poetry for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# shell: pwsh -# if: matrix.test-suite == 'venv' -# run: | -# python -m pip install poetry -# Move-Item -Path ".\build\ci\pyproject.toml" -Destination . -# poetry env use python - -# - name: Prepare virtualenv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# if: matrix.test-suite == 'venv' -# run: | -# python -m pip install virtualenv -# python -m virtualenv .virtualenv/ -# if ('${{ matrix.os }}' -match 'windows-latest') { -# & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath -# } else { -# & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath -# } - -# - name: Prepare venv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) -# run: | -# python -m venv .venv -# if ('${{ matrix.os }}' -match 'windows-latest') { -# & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath -# } else { -# & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath -# } - -# - name: Prepare conda for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# if: matrix.test-suite == 'venv' -# run: | -# # 1. For `*.testvirtualenvs.test.ts` -# if ('${{ matrix.os }}' -match 'windows-latest') { -# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe -# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda -# } else{ -# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python -# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda -# } -# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath -# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath -# & $condaExecPath init --all - -# - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION -# run: | -# echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV -# echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV -# shell: bash -# if: matrix.test-suite != 'ts-unit' - -# # Run TypeScript unit tests only for Python 3.X. -# - name: Run TypeScript unit tests -# run: npm run test:unittests -# if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) - -# # The virtual environment based tests use the `testSingleWorkspace` set of tests -# # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, -# # which is set in the "Prepare environment for venv tests" step. -# # We also use a third-party GitHub Action to install xvfb on Linux, -# # run tests and then clean up the process once the tests ran. -# # See https://github.com/GabrielBB/xvfb-action -# - name: Run venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# CI_PYTHON_VERSION: ${{ matrix.python }} -# uses: GabrielBB/xvfb-action@v1.6 -# with: -# run: npm run testSingleWorkspace -# working-directory: ${{ env.special-working-directory }} -# if: matrix.test-suite == 'venv' - -# - name: Run single-workspace tests -# env: -# CI_PYTHON_VERSION: ${{ matrix.python }} -# uses: GabrielBB/xvfb-action@v1.6 -# with: -# run: npm run testSingleWorkspace -# working-directory: ${{ env.special-working-directory }} -# if: matrix.test-suite == 'single-workspace' - -# - name: Run debugger tests -# env: -# CI_PYTHON_VERSION: ${{ matrix.python }} -# uses: GabrielBB/xvfb-action@v1.6 -# with: -# run: npm run testDebugger -# working-directory: ${{ env.special-working-directory }} -# if: matrix.test-suite == 'debugger' - -# # Run TypeScript functional tests -# - name: Run TypeScript functional tests -# run: npm run test:functional -# if: matrix.test-suite == 'functional' + build-vsix: + name: Create VSIX + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build VSIX + uses: ./.github/actions/build-vsix + with: + node_version: ${{ env.NODE_VERSION}} + vsix_name: ${{ env.VSIX_NAME }} + artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint + uses: ./.github/actions/lint + with: + node_version: ${{ env.NODE_VERSION }} + + check-types: + name: Check Python types + runs-on: ubuntu-latest + steps: + - name: Use Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Checkout + uses: actions/checkout@v4 + + - name: Install base Python requirements + uses: brettcannon/pip-secure-install@v1 + with: + options: '-t ./python_files/lib/python --no-cache-dir --implementation py' + + - name: Install Jedi requirements + uses: brettcannon/pip-secure-install@v1 + with: + requirements-file: './python_files/jedilsp_requirements/requirements.txt' + options: '-t ./python_files/lib/jedilsp --no-cache-dir --implementation py' + + - name: Install other Python requirements + run: | + python -m pip install --upgrade -r build/test-requirements.txt + + - name: Run Pyright + uses: jakebailey/pyright-action@v2 + with: + version: 1.1.308 + working-directory: 'python_files' + + python-tests: + name: Python Tests + # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. + runs-on: ${{ matrix.os }} + defaults: + run: + working-directory: ${{ env.special-working-directory }} + strategy: + fail-fast: false + matrix: + # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, + # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. + os: [ubuntu-latest, windows-latest] + # Run the tests on the oldest and most recent versions of Python. + python: ['3.8', '3.x'] # run for 3 pytest versions, most recent stable, oldest version supported and pre-release + pytest-version: ['pytest', 'pytest@pre-release', 'pytest==6.2.0'] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: ${{ env.special-working-directory-relative }} + + - name: Use Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Install specific pytest version + if: matrix.pytest-version == 'pytest@pre-release' + run: | + python -m pip install --pre pytest + + - name: Install specific pytest version + if: matrix.pytest-version != 'pytest@pre-release' + run: | + python -m pip install "${{ matrix.pytest-version }}" + + - name: Install specific pytest version + run: python -m pytest --version + - name: Install base Python requirements + uses: brettcannon/pip-secure-install@v1 + with: + requirements-file: '"${{ env.special-working-directory-relative }}/requirements.txt"' + options: '-t "${{ env.special-working-directory-relative }}/python_files/lib/python" --no-cache-dir --implementation py' + + - name: Install test requirements + run: python -m pip install --upgrade -r build/test-requirements.txt + + - name: Run Python unit tests + run: python python_files/tests/run_all.py + + tests: + name: Tests + # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. + runs-on: ${{ matrix.os }} + defaults: + run: + working-directory: ${{ env.special-working-directory }} + strategy: + fail-fast: false + matrix: + # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, + # macOS runners are expensive, and we assume that Ubuntu is enough to cover the Unix case. + os: [ubuntu-latest, windows-latest] + # Run the tests on the oldest and most recent versions of Python. + python: ['3.x'] + test-suite: [ts-unit, venv, single-workspace, debugger, functional] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: ${{ env.special-working-directory-relative }} + + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + cache-dependency-path: ${{ env.special-working-directory-relative }}/package-lock.json + + - name: Install dependencies (npm ci) + run: npm ci + + - name: Compile + run: npx gulp prePublishNonBundle + + - name: Localization + run: npx @vscode/l10n-dev@latest export ./src + + - name: Use Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Upgrade Pip + run: python -m pip install -U pip + + # For faster/better builds of sdists. + - name: Install build pre-requisite + run: python -m pip install wheel nox + + - name: Install Python Extension dependencies (jedi, etc.) + run: nox --session install_python_libs + + - name: Install test requirements + run: python -m pip install --upgrade -r build/test-requirements.txt + + - name: Install functional test requirements + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt + if: matrix.test-suite == 'functional' + + - name: Prepare pipenv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + if: matrix.test-suite == 'venv' + run: | + python -m pip install pipenv + python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath + + - name: Prepare poetry for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + shell: pwsh + if: matrix.test-suite == 'venv' + run: | + python -m pip install poetry + Move-Item -Path ".\build\ci\pyproject.toml" -Destination . + poetry env use python + + - name: Prepare virtualenv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + if: matrix.test-suite == 'venv' + run: | + python -m pip install virtualenv + python -m virtualenv .virtualenv/ + if ('${{ matrix.os }}' -match 'windows-latest') { + & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath + } else { + & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath + } + + - name: Prepare venv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + if: matrix.test-suite == 'venv' && startsWith(matrix.python, 3.) + run: | + python -m venv .venv + if ('${{ matrix.os }}' -match 'windows-latest') { + & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath + } else { + & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath + } + + - name: Prepare conda for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + if: matrix.test-suite == 'venv' + run: | + # 1. For `*.testvirtualenvs.test.ts` + if ('${{ matrix.os }}' -match 'windows-latest') { + $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe + $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda + } else{ + $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python + $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda + } + & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath + & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath + & $condaExecPath init --all + + - name: Set CI_PYTHON_PATH and CI_DISABLE_AUTO_SELECTION + run: | + echo "CI_PYTHON_PATH=python" >> $GITHUB_ENV + echo "CI_DISABLE_AUTO_SELECTION=1" >> $GITHUB_ENV + shell: bash + if: matrix.test-suite != 'ts-unit' + + # Run TypeScript unit tests only for Python 3.X. + - name: Run TypeScript unit tests + run: npm run test:unittests + if: matrix.test-suite == 'ts-unit' && startsWith(matrix.python, 3.) + + # The virtual environment based tests use the `testSingleWorkspace` set of tests + # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, + # which is set in the "Prepare environment for venv tests" step. + # We also use a third-party GitHub Action to install xvfb on Linux, + # run tests and then clean up the process once the tests ran. + # See https://github.com/GabrielBB/xvfb-action + - name: Run venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + CI_PYTHON_VERSION: ${{ matrix.python }} + uses: GabrielBB/xvfb-action@v1.6 + with: + run: npm run testSingleWorkspace + working-directory: ${{ env.special-working-directory }} + if: matrix.test-suite == 'venv' + + - name: Run single-workspace tests + env: + CI_PYTHON_VERSION: ${{ matrix.python }} + uses: GabrielBB/xvfb-action@v1.6 + with: + run: npm run testSingleWorkspace + working-directory: ${{ env.special-working-directory }} + if: matrix.test-suite == 'single-workspace' + + - name: Run debugger tests + env: + CI_PYTHON_VERSION: ${{ matrix.python }} + uses: GabrielBB/xvfb-action@v1.6 + with: + run: npm run testDebugger + working-directory: ${{ env.special-working-directory }} + if: matrix.test-suite == 'debugger' + + # Run TypeScript functional tests + - name: Run TypeScript functional tests + run: npm run test:functional + if: matrix.test-suite == 'functional' native-tests: name: Native Tests @@ -335,210 +335,210 @@ jobs: run: cargo test -- --nocapture working-directory: ${{ env.special-working-directory }}/native_locator -# smoke-tests: -# name: Smoke tests -# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. -# runs-on: ${{ matrix.os }} -# needs: [build-vsix] -# strategy: -# fail-fast: false -# matrix: -# # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, -# # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. -# os: [ubuntu-latest, windows-latest] -# steps: -# # Need the source to have the tests available. -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Smoke tests -# uses: ./.github/actions/smoke-tests -# with: -# node_version: ${{ env.NODE_VERSION }} -# artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} - -# ### Coverage run -# coverage: -# name: Coverage -# # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. -# runs-on: ${{ matrix.os }} -# strategy: -# fail-fast: false -# matrix: -# # Only run coverage on linux for PRs -# os: [ubuntu-latest] - -# steps: -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Install Node -# uses: actions/setup-node@v4 -# with: -# node-version: ${{ env.NODE_VERSION }} -# cache: 'npm' - -# - name: Install dependencies (npm ci) -# run: npm ci - -# - name: Compile -# run: npx gulp prePublishNonBundle - -# - name: Localization -# run: npx @vscode/l10n-dev@latest export ./src - -# - name: Use Python ${{ env.PYTHON_VERSION }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ env.PYTHON_VERSION }} -# cache: 'pip' -# cache-dependency-path: | -# requirements.txt -# python_files/jedilsp_requirements/requirements.txt -# build/test-requirements.txt -# build/functional-test-requirements.txt - -# - name: Install base Python requirements -# uses: brettcannon/pip-secure-install@v1 -# with: -# options: '-t ./python_files/lib/python --implementation py' - -# - name: Install Jedi requirements -# uses: brettcannon/pip-secure-install@v1 -# with: -# requirements-file: './python_files/jedilsp_requirements/requirements.txt' -# options: '-t ./python_files/lib/jedilsp --implementation py' - -# - name: Install test requirements -# run: python -m pip install --upgrade -r build/test-requirements.txt - -# - name: Install functional test requirements -# run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt - -# - name: Prepare pipenv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# run: | -# python -m pip install pipenv -# python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath - -# - name: Prepare poetry for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# shell: pwsh -# run: | -# python -m pip install poetry -# Move-Item -Path ".\build\ci\pyproject.toml" -Destination . -# poetry env use python - -# - name: Prepare virtualenv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# run: | -# python -m pip install virtualenv -# python -m virtualenv .virtualenv/ -# if ('${{ matrix.os }}' -match 'windows-latest') { -# & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath -# } else { -# & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath -# } - -# - name: Prepare venv for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# run: | -# python -m venv .venv -# if ('${{ matrix.os }}' -match 'windows-latest') { -# & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath -# } else { -# & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath -# } - -# - name: Prepare conda for venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' -# shell: pwsh -# run: | -# # 1. For `*.testvirtualenvs.test.ts` -# if ('${{ matrix.os }}' -match 'windows-latest') { -# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe -# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda -# } else{ -# $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python -# $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda -# } -# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath -# & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath -# & $condaExecPath init --all - -# - name: Run TypeScript unit tests -# run: npm run test:unittests:cover - -# - name: Run Python unit tests -# run: | -# python python_files/tests/run_all.py - -# # The virtual environment based tests use the `testSingleWorkspace` set of tests -# # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, -# # which is set in the "Prepare environment for venv tests" step. -# # We also use a third-party GitHub Action to install xvfb on Linux, -# # run tests and then clean up the process once the tests ran. -# # See https://github.com/GabrielBB/xvfb-action -# - name: Run venv tests -# env: -# TEST_FILES_SUFFIX: testvirtualenvs -# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} -# CI_DISABLE_AUTO_SELECTION: 1 -# uses: GabrielBB/xvfb-action@v1.6 -# with: -# run: npm run testSingleWorkspace:cover - -# - name: Run single-workspace tests -# env: -# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} -# CI_DISABLE_AUTO_SELECTION: 1 -# uses: GabrielBB/xvfb-action@v1.6 -# with: -# run: npm run testSingleWorkspace:cover - -# # Enable these tests when coverage is setup for multiroot workspace tests -# # - name: Run multi-workspace tests -# # env: -# # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} -# # CI_DISABLE_AUTO_SELECTION: 1 -# # uses: GabrielBB/xvfb-action@v1.6 -# # with: -# # run: npm run testMultiWorkspace:cover - -# # Enable these tests when coverage is setup for debugger tests -# # - name: Run debugger tests -# # env: -# # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} -# # CI_DISABLE_AUTO_SELECTION: 1 -# # uses: GabrielBB/xvfb-action@v1.6 -# # with: -# # run: npm run testDebugger:cover - -# # Run TypeScript functional tests -# - name: Run TypeScript functional tests -# env: -# CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} -# CI_DISABLE_AUTO_SELECTION: 1 -# run: npm run test:functional:cover - -# - name: Generate coverage reports -# run: npm run test:cover:report - -# - name: Upload HTML report -# uses: actions/upload-artifact@v4 -# with: -# name: ${{ runner.os }}-coverage-report-html -# path: ./coverage -# retention-days: 1 + smoke-tests: + name: Smoke tests + # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. + runs-on: ${{ matrix.os }} + needs: [build-vsix] + strategy: + fail-fast: false + matrix: + # We're not running CI on macOS for now because it's one less matrix entry to lower the number of runners used, + # macOS runners are expensive, and we assume that Ubuntu is enough to cover the UNIX case. + os: [ubuntu-latest, windows-latest] + steps: + # Need the source to have the tests available. + - name: Checkout + uses: actions/checkout@v4 + + - name: Smoke tests + uses: ./.github/actions/smoke-tests + with: + node_version: ${{ env.NODE_VERSION }} + artifact_name: ${{ env.ARTIFACT_NAME_VSIX }} + + ### Coverage run + coverage: + name: Coverage + # The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded. + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Only run coverage on linux for PRs + os: [ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: Install dependencies (npm ci) + run: npm ci + + - name: Compile + run: npx gulp prePublishNonBundle + + - name: Localization + run: npx @vscode/l10n-dev@latest export ./src + + - name: Use Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + cache-dependency-path: | + requirements.txt + python_files/jedilsp_requirements/requirements.txt + build/test-requirements.txt + build/functional-test-requirements.txt + + - name: Install base Python requirements + uses: brettcannon/pip-secure-install@v1 + with: + options: '-t ./python_files/lib/python --implementation py' + + - name: Install Jedi requirements + uses: brettcannon/pip-secure-install@v1 + with: + requirements-file: './python_files/jedilsp_requirements/requirements.txt' + options: '-t ./python_files/lib/jedilsp --implementation py' + + - name: Install test requirements + run: python -m pip install --upgrade -r build/test-requirements.txt + + - name: Install functional test requirements + run: python -m pip install --upgrade -r ./build/functional-test-requirements.txt + + - name: Prepare pipenv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + run: | + python -m pip install pipenv + python -m pipenv run python ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} pipenvPath + + - name: Prepare poetry for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + shell: pwsh + run: | + python -m pip install poetry + Move-Item -Path ".\build\ci\pyproject.toml" -Destination . + poetry env use python + + - name: Prepare virtualenv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + run: | + python -m pip install virtualenv + python -m virtualenv .virtualenv/ + if ('${{ matrix.os }}' -match 'windows-latest') { + & ".virtualenv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath + } else { + & ".virtualenv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} virtualEnvPath + } + + - name: Prepare venv for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + run: | + python -m venv .venv + if ('${{ matrix.os }}' -match 'windows-latest') { + & ".venv/Scripts/python.exe" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath + } else { + & ".venv/bin/python" ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} venvPath + } + + - name: Prepare conda for venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + PYTHON_VIRTUAL_ENVS_LOCATION: './src/tmp/envPaths.json' + shell: pwsh + run: | + # 1. For `*.testvirtualenvs.test.ts` + if ('${{ matrix.os }}' -match 'windows-latest') { + $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath python.exe + $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath Scripts | Join-Path -ChildPath conda + } else{ + $condaPythonPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath python + $condaExecPath = Join-Path -Path $Env:CONDA -ChildPath bin | Join-Path -ChildPath conda + } + & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaExecPath $condaExecPath + & $condaPythonPath ./build/ci/addEnvPath.py ${{ env.PYTHON_VIRTUAL_ENVS_LOCATION }} condaPath + & $condaExecPath init --all + + - name: Run TypeScript unit tests + run: npm run test:unittests:cover + + - name: Run Python unit tests + run: | + python python_files/tests/run_all.py + + # The virtual environment based tests use the `testSingleWorkspace` set of tests + # with the environment variable `TEST_FILES_SUFFIX` set to `testvirtualenvs`, + # which is set in the "Prepare environment for venv tests" step. + # We also use a third-party GitHub Action to install xvfb on Linux, + # run tests and then clean up the process once the tests ran. + # See https://github.com/GabrielBB/xvfb-action + - name: Run venv tests + env: + TEST_FILES_SUFFIX: testvirtualenvs + CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.6 + with: + run: npm run testSingleWorkspace:cover + + - name: Run single-workspace tests + env: + CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + CI_DISABLE_AUTO_SELECTION: 1 + uses: GabrielBB/xvfb-action@v1.6 + with: + run: npm run testSingleWorkspace:cover + + # Enable these tests when coverage is setup for multiroot workspace tests + # - name: Run multi-workspace tests + # env: + # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + # CI_DISABLE_AUTO_SELECTION: 1 + # uses: GabrielBB/xvfb-action@v1.6 + # with: + # run: npm run testMultiWorkspace:cover + + # Enable these tests when coverage is setup for debugger tests + # - name: Run debugger tests + # env: + # CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + # CI_DISABLE_AUTO_SELECTION: 1 + # uses: GabrielBB/xvfb-action@v1.6 + # with: + # run: npm run testDebugger:cover + + # Run TypeScript functional tests + - name: Run TypeScript functional tests + env: + CI_PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + CI_DISABLE_AUTO_SELECTION: 1 + run: npm run test:functional:cover + + - name: Generate coverage reports + run: npm run test:cover:report + + - name: Upload HTML report + uses: actions/upload-artifact@v4 + with: + name: ${{ runner.os }}-coverage-report-html + path: ./coverage + retention-days: 1 diff --git a/native_locator/src/pyenv.rs b/native_locator/src/pyenv.rs index f48380893e99..8e7a734a297d 100644 --- a/native_locator/src/pyenv.rs +++ b/native_locator/src/pyenv.rs @@ -22,7 +22,6 @@ fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { #[cfg(unix)] fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { - println!("\nget_home_pyenv_dir"); let home = environment.get_user_home()?; PathBuf::from(home) .join(".pyenv") @@ -34,13 +33,10 @@ fn get_home_pyenv_dir(environment: &impl known::Environment) -> Option { fn get_binary_from_known_paths(environment: &impl known::Environment) -> Option { for known_path in environment.get_know_global_search_locations() { let bin = known_path.join("pyenv"); - println!("\nget_binary_from_known_paths {:?}", bin); if bin.exists() { - println!("\nget_binary_from_known_paths {:?} found", bin); return bin.into_os_string().into_string().ok(); } } - println!("\nget_binary_from_known_paths NOT found"); None } @@ -51,7 +47,6 @@ fn get_pyenv_dir(environment: &impl known::Environment) -> Option { // If the interpreter path starts with the path to the pyenv folder, then it is a pyenv environment. // See https://github.com/pyenv/pyenv#locating-the-python-installation for general usage, // And https://github.com/pyenv-win/pyenv-win for Windows specifics. - println!("\nget_pyenv_dir"); match environment.get_env_var("PYENV_ROOT".to_string()) { Some(dir) => Some(dir), @@ -66,7 +61,6 @@ fn get_pyenv_binary(environment: &impl known::Environment) -> Option { let dir = get_pyenv_dir(environment)?; let exe = PathBuf::from(dir).join("bin").join("pyenv"); if fs::metadata(&exe).is_ok() { - println!("\nget_pyenv_binary FOUND"); exe.into_os_string().into_string().ok() } else { get_binary_from_known_paths(environment) @@ -75,7 +69,6 @@ fn get_pyenv_binary(environment: &impl known::Environment) -> Option { fn get_pyenv_version(folder_name: String) -> Option { // Stable Versions = like 3.10.10 - println!("\nget_pyenv_version for {:?}", folder_name); let python_regex = Regex::new(r"^(\d+\.\d+\.\d+)$").unwrap(); match python_regex.captures(&folder_name) { Some(captures) => match captures.get(1) { @@ -116,7 +109,6 @@ pub fn find_and_report( dispatcher.report_environment_manager(messaging::EnvManager::new(vec![pyenv_binary], None)); } - println!("\nfind_and_report for pyenv_dir {:?}", pyenv_dir); let versions_dir = PathBuf::from(&pyenv_dir) .join("versions") .into_os_string() @@ -127,21 +119,17 @@ pub fn find_and_report( Some(binary) => binary, None => "pyenv".to_string(), }; - println!("\nfind_and_report for versions {:?}", versions_dir); for entry in fs::read_dir(&versions_dir).ok()? { if let Ok(path) = entry { let path = path.path(); if path.is_dir() { - println!("\nfind_and_report for {:?}", path); if let Some(executable) = find_python_binary_path(&path) { - println!("\nfind_and_report found binary for {:?}", path); let version = - get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); + get_pyenv_version(path.file_name().unwrap().to_string_lossy().to_string()); // If we cannot extract version, this isn't a valid pyenv environment. // Or its one that we're not interested in. if version.is_none() { - println!("\nfind_and_report found binary for {:?} and no version", path); continue; } let env_path = path.to_string_lossy().to_string(); diff --git a/native_locator/tests/pyenv_test.rs b/native_locator/tests/pyenv_test.rs index b8d05d19451c..896fbe62a035 100644 --- a/native_locator/tests/pyenv_test.rs +++ b/native_locator/tests/pyenv_test.rs @@ -3,52 +3,52 @@ mod common; -// #[test] -// #[cfg(unix)] -// fn does_not_find_any_pyenv_envs() { -// use crate::common::{create_test_dispatcher, create_test_environment}; -// use python_finder::pyenv; -// use std::collections::HashMap; +#[test] +#[cfg(unix)] +fn does_not_find_any_pyenv_envs() { + use crate::common::{create_test_dispatcher, create_test_environment}; + use python_finder::pyenv; + use std::collections::HashMap; -// let mut dispatcher = create_test_dispatcher(); -// let known = create_test_environment( -// HashMap::new(), -// Some("SOME_BOGUS_HOME_DIR".to_string()), -// Vec::new(), -// ); + let mut dispatcher = create_test_dispatcher(); + let known = create_test_environment( + HashMap::new(), + Some("SOME_BOGUS_HOME_DIR".to_string()), + Vec::new(), + ); -// pyenv::find_and_report(&mut dispatcher, &known); + pyenv::find_and_report(&mut dispatcher, &known); -// assert_eq!(dispatcher.messages.len(), 0); -// } + assert_eq!(dispatcher.messages.len(), 0); +} -// #[test] -// #[cfg(unix)] -// fn does_not_find_any_pyenv_envs_even_with_pyenv_installed() { -// use crate::common::{ -// assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, -// test_file_path, -// }; -// use python_finder::pyenv; -// use serde_json::json; -// use std::{collections::HashMap, path::PathBuf}; +#[test] +#[cfg(unix)] +fn does_not_find_any_pyenv_envs_even_with_pyenv_installed() { + use crate::common::{ + assert_messages, create_test_dispatcher, create_test_environment, join_test_paths, + test_file_path, + }; + use python_finder::pyenv; + use serde_json::json; + use std::{collections::HashMap, path::PathBuf}; -// let mut dispatcher = create_test_dispatcher(); -// let home = test_file_path(&["tests", "unix", "pyenv_without_envs"]); -// let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); -// let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); -// let known = create_test_environment( -// HashMap::new(), -// Some(home.clone()), -// vec![PathBuf::from(homebrew_bin)], -// ); + let mut dispatcher = create_test_dispatcher(); + let home = test_file_path(&["tests", "unix", "pyenv_without_envs"]); + let homebrew_bin = join_test_paths(&[home.as_str(), "opt", "homebrew", "bin"]); + let pyenv_exe = join_test_paths(&[homebrew_bin.as_str(), "pyenv"]); + let known = create_test_environment( + HashMap::new(), + Some(home.clone()), + vec![PathBuf::from(homebrew_bin)], + ); -// pyenv::find_and_report(&mut dispatcher, &known); + pyenv::find_and_report(&mut dispatcher, &known); -// assert_eq!(dispatcher.messages.len(), 1); -// let expected_json = json!({"executablePath":[pyenv_exe],"version":null}); -// assert_messages(&[expected_json], &dispatcher) -// } + assert_eq!(dispatcher.messages.len(), 1); + let expected_json = json!({"executablePath":[pyenv_exe],"version":null}); + assert_messages(&[expected_json], &dispatcher) +} #[test] #[cfg(unix)]