Add support for global uv python pin (#12115)

These changes add support for

```
uv python pin 3.12 --global 
```

This adds the specified version to a `.python-version` file in the
user-level config directory. uv will now use the user-level version as a
fallback if no version is found in the project directory or its
ancestors.

Closes #4972
This commit is contained in:
John Mumm 2025-03-13 13:48:37 +01:00 committed by GitHub
parent b4eabf9a61
commit 797f1fbac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 366 additions and 16 deletions

View file

@ -347,6 +347,12 @@ impl EnvVars {
/// Path to system-level configuration directory on Windows systems.
pub const SYSTEMDRIVE: &'static str = "SYSTEMDRIVE";
/// Path to user-level configuration directory on Windows systems.
pub const APPDATA: &'static str = "APPDATA";
/// Path to root directory of user's profile on Windows systems.
pub const USERPROFILE: &'static str = "USERPROFILE";
/// Path to user-level configuration directory on Unix systems.
pub const XDG_CONFIG_HOME: &'static str = "XDG_CONFIG_HOME";