Skip to main content

discover

Function discover 

Source
pub fn discover(
    host: &Host<'_>,
    project: bool,
    pyenv: impl Fn(&Path, &Host<'_>) -> Result<PathBuf, String>,
) -> Result<Found, PyenvError>
Expand description

Finds the Python for the built-in python interpreter.

project turns on the steps that depend on the user’s shell and directory (an active virtualenv, a project venv): the local commands use them, a worker won’t (milestone M2). pyenv resolves a shim (normally pyenv_which).

§Errors

PyenvError if python3 on PATH is a pyenv shim that pyenv can’t resolve.