Deduplicate implementation for python_installation_from_directory (#7267)

This commit is contained in:
Zanie Blue 2024-09-10 13:41:31 -05:00 committed by GitHub
parent 533c7e3bfd
commit aa52952512
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -676,10 +676,7 @@ fn python_installation_from_directory(
cache: &Cache,
) -> Result<PythonInstallation, crate::interpreter::Error> {
let executable = virtualenv_python_executable(path);
Ok(PythonInstallation {
source: PythonSource::ProvidedPath,
interpreter: Interpreter::query(executable, cache)?,
})
python_installation_from_executable(&executable, cache)
}
/// Lazily iterate over all Python interpreters on the path with the given executable name.