mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-22 00:02:32 +00:00
Display Python installation key for discovered interpreters (#5365)
> DEBUG Found `cpython-3.12.1-macos-aarch64-none` at `/Users/zb/Library/Application Support/uv/python/cpython-3.12.1-macos-aarch64-none/bin/python3` (managed installations) Instead of `<implementation> <version>` > DEBUG Found cpython 3.12.1 at `/Users/zb/Library/Application Support/uv/python/cpython-3.12.1-macos-aarch64-none/bin/python3` (managed installations)
This commit is contained in:
parent
2cdcc61da9
commit
7908436a76
3 changed files with 39 additions and 18 deletions
|
@ -166,15 +166,7 @@ impl PythonInstallation {
|
|||
}
|
||||
|
||||
pub fn key(&self) -> PythonInstallationKey {
|
||||
PythonInstallationKey::new(
|
||||
LenientImplementationName::from(self.interpreter.implementation_name()),
|
||||
self.interpreter.python_major(),
|
||||
self.interpreter.python_minor(),
|
||||
self.interpreter.python_patch(),
|
||||
self.os(),
|
||||
self.arch(),
|
||||
self.libc(),
|
||||
)
|
||||
self.interpreter.key()
|
||||
}
|
||||
|
||||
/// Return the Python [`Version`] of the Python installation as reported by its interpreter.
|
||||
|
@ -189,17 +181,17 @@ impl PythonInstallation {
|
|||
|
||||
/// Return the [`Arch`] of the Python installation as reported by its interpreter.
|
||||
pub fn arch(&self) -> Arch {
|
||||
Arch::from(&self.interpreter.platform().arch())
|
||||
self.interpreter.arch()
|
||||
}
|
||||
|
||||
/// Return the [`Libc`] of the Python installation as reported by its interpreter.
|
||||
pub fn libc(&self) -> Libc {
|
||||
Libc::from(self.interpreter.platform().os())
|
||||
self.interpreter.libc()
|
||||
}
|
||||
|
||||
/// Return the [`Os`] of the Python installation as reported by its interpreter.
|
||||
pub fn os(&self) -> Os {
|
||||
Os::from(self.interpreter.platform().os())
|
||||
self.interpreter.os()
|
||||
}
|
||||
|
||||
/// Return the [`Interpreter`] for the Python installation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue