From 61487e13a44283aff1f257181725989e76fe5f87 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 19 Aug 2024 14:30:02 -0500 Subject: [PATCH] Document the Python installation directory --- crates/uv-cli/src/lib.rs | 6 ++++++ crates/uv-state/src/lib.rs | 1 + docs/reference/cli.md | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 0a0ef5fce1eb..cd3a98278a95 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -2948,6 +2948,12 @@ pub enum PythonCommand { Pin(PythonPinArgs), /// Show the uv Python installation directory. + /// + /// By default, Python installations are stored in the uv data directory at + /// `$XDG_DATA_HOME/uv/python` or `$HOME/.local/share/uv/python` on Unix and + /// `{FOLDERID_RoamingAppData}\uv\data\python` on Windows. + /// + /// The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`. Dir, /// Uninstall Python versions. diff --git a/crates/uv-state/src/lib.rs b/crates/uv-state/src/lib.rs index 91dfb47c28b5..f385c321a35d 100644 --- a/crates/uv-state/src/lib.rs +++ b/crates/uv-state/src/lib.rs @@ -75,6 +75,7 @@ impl StateStore { } /// Prefer, in order: + /// /// 1. The specific state directory specified by the user. /// 2. The system-appropriate user-level data directory. /// 3. A `.uv` directory in the current working directory. diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 1141e21fbf5f..47315486cd3b 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -3328,7 +3328,11 @@ uv python pin [OPTIONS] [REQUEST] ### uv python dir -Show the uv Python installation directory +Show the uv Python installation directory. + +By default, Python installations are stored in the uv data directory at `$XDG_DATA_HOME/uv/python` or `$HOME/.local/share/uv/python` on Unix and `{FOLDERID_RoamingAppData}\uv\data\python` on Windows. + +The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`.

Usage