Skip to content

Commit

Permalink
Document the Python installation directory
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 19, 2024
1 parent ea3db27 commit 61487e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions crates/uv-state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

<h3 class="cli-reference">Usage</h3>

Expand Down

0 comments on commit 61487e1

Please sign in to comment.