Move py launcher handling into separate module (#3329)

Split out of #3266 

Mostly an organizational change, with some error handling
simplification.
This commit is contained in:
Zanie Blue 2024-05-02 06:44:07 -05:00 committed by GitHub
parent 2e27abd34a
commit 528bed5bed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 138 additions and 92 deletions

View file

@ -27,6 +27,7 @@ mod environment;
mod find_python;
mod interpreter;
pub mod managed;
mod py_launcher;
mod python_version;
pub mod selectors;
mod target;
@ -49,8 +50,8 @@ pub enum Error {
#[source]
err: io::Error,
},
#[error("Failed to run `py --list-paths` to find Python installations. Is Python installed?")]
PyList(#[source] io::Error),
#[error(transparent)]
PyLauncher(#[from] py_launcher::Error),
#[cfg(windows)]
#[error(
"No Python {0} found through `py --list-paths` or in `PATH`. Is Python {0} installed?"