Install versioned Python executables into the bin directory during uv python install (#8458)

Updates `uv python install` to link `python3.x` in the executable
directory (i.e., `~/.local/bin`) to the the managed interpreter path.

Includes

- #8569 
- #8571 

Remaining work

- #8663 
- #8650 
- Add an opt-out setting and flag
- Update documentation
This commit is contained in:
Zanie Blue
2024-10-30 09:13:20 -05:00
committed by GitHub
parent 94fc35edd9
commit 4dd36b799f
19 changed files with 597 additions and 89 deletions
+11
View File
@@ -305,6 +305,17 @@ impl PythonInstallationKey {
pub fn libc(&self) -> &Libc {
&self.libc
}
/// Return a canonical name for a versioned executable.
pub fn versioned_executable_name(&self) -> String {
format!(
"python{maj}.{min}{var}{exe}",
maj = self.major,
min = self.minor,
var = self.variant.suffix(),
exe = std::env::consts::EXE_SUFFIX
)
}
}
impl fmt::Display for PythonInstallationKey {