Update the CLI help and reference to include references to the Python bin directory (#13978)

Closes https://github.com/astral-sh/uv/issues/13977
This commit is contained in:
Zanie Blue 2025-06-12 05:02:51 -05:00 committed by GitHub
parent b3d7f79770
commit 87ab57e902
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View File

@ -4728,7 +4728,8 @@ pub enum PythonCommand {
///
/// A `python` executable is not made globally available, managed Python versions are only used
/// in uv commands or in active virtual environments. There is experimental support for adding
/// Python executables to the `PATH` — use the `--preview` flag to enable this behavior.
/// Python executables to a directory on the path — use the `--preview` flag to enable this
/// behavior and `uv python dir --bin` to retrieve the target directory.
///
/// Multiple Python versions may be requested.
///
@ -4763,7 +4764,8 @@ pub enum PythonCommand {
/// The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`.
///
/// To view the directory where uv installs Python executables instead, use the `--bin` flag.
/// Note that Python executables are only installed when preview mode is enabled.
/// The Python executable directory may be overridden with `$UV_PYTHON_BIN_DIR`. Note that
/// Python executables are only installed when preview mode is enabled.
Dir(PythonDirArgs),
/// Uninstall Python versions.

View File

@ -468,7 +468,8 @@ fn help_subsubcommand() {
A `python` executable is not made globally available, managed Python versions are only used in uv
commands or in active virtual environments. There is experimental support for adding Python
executables to the `PATH` use the `--preview` flag to enable this behavior.
executables to a directory on the path use the `--preview` flag to enable this behavior and `uv
python dir --bin` to retrieve the target directory.
Multiple Python versions may be requested.

View File

@ -2666,7 +2666,7 @@ Supports CPython and PyPy. CPython distributions are downloaded from the Astral
Python versions are installed into the uv Python directory, which can be retrieved with `uv python dir`.
A `python` executable is not made globally available, managed Python versions are only used in uv commands or in active virtual environments. There is experimental support for adding Python executables to the `PATH` — use the `--preview` flag to enable this behavior.
A `python` executable is not made globally available, managed Python versions are only used in uv commands or in active virtual environments. There is experimental support for adding Python executables to a directory on the path — use the `--preview` flag to enable this behavior and `uv python dir --bin` to retrieve the target directory.
Multiple Python versions may be requested.
@ -2917,7 +2917,7 @@ By default, Python installations are stored in the uv data directory at `$XDG_DA
The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`.
To view the directory where uv installs Python executables instead, use the `--bin` flag. Note that Python executables are only installed when preview mode is enabled.
To view the directory where uv installs Python executables instead, use the `--bin` flag. The Python executable directory may be overridden with `$UV_PYTHON_BIN_DIR`. Note that Python executables are only installed when preview mode is enabled.
<h3 class="cli-reference">Usage</h3>