Rename and document venv discoveries (#2334)

Preparing for #2058, i found it hard to follow where which discovery
function gets called. I moved all the discovery functions to a
`find_python` module (some exposed through `PythonEnvironment`) and
documented which subcommand uses which python discovery strategy.

No functional changes.

![new uv-virtualenv docs
page](https://github.com/astral-sh/uv/assets/6826232/cd56df8a-754d-4640-9e7a-e1f9baf6441c)
This commit is contained in:
konsti
2024-03-10 14:44:50 +01:00
committed by GitHub
parent 73b30ba8ed
commit 262ca8b576
5 changed files with 149 additions and 145 deletions
@@ -10,7 +10,7 @@ use uv_fs::{LockedFile, Simplified};
use crate::cfg::PyVenvConfiguration;
use crate::{find_default_python, find_requested_python, Error, Interpreter};
/// A Python environment, consisting of a Python [`Interpreter`] and a root directory.
/// A Python environment, consisting of a Python [`Interpreter`] and its associated paths.
#[derive(Debug, Clone)]
pub struct PythonEnvironment {
root: PathBuf,