mirror of https://github.com/astral-sh/uv
Add `UV_` prefix to installer environment variables (#14964)
## Summary Available as of https://github.com/astral-sh/cargo-dist/pull/46.
This commit is contained in:
parent
e7c8b47b7a
commit
b31d786fe9
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
# we specify bash to get pipefail; it guards against the `curl` command
|
||||
# failing. otherwise `sh` won't catch that `curl` returned non-0
|
||||
shell: bash
|
||||
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.7-prerelease.1/cargo-dist-installer.sh | sh"
|
||||
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/cargo-dist/releases/download/v0.28.7-prerelease.2/cargo-dist-installer.sh | sh"
|
||||
- name: Cache dist
|
||||
uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -731,9 +731,15 @@ impl EnvVars {
|
|||
/// the installer from modifying shell profiles or environment variables.
|
||||
pub const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL";
|
||||
|
||||
/// The URL from which to download uv using the standalone installer. By default, installs from
|
||||
/// uv's GitHub Releases. `INSTALLER_DOWNLOAD_URL` is also supported as an alias, for backwards
|
||||
/// compatibility.
|
||||
pub const UV_DOWNLOAD_URL: &'static str = "UV_DOWNLOAD_URL";
|
||||
|
||||
/// Avoid modifying the `PATH` environment variable when installing uv using the standalone
|
||||
/// installer and `self update` feature.
|
||||
pub const INSTALLER_NO_MODIFY_PATH: &'static str = "INSTALLER_NO_MODIFY_PATH";
|
||||
/// installer and `self update` feature. `INSTALLER_NO_MODIFY_PATH` is also supported as an
|
||||
/// alias, for backwards compatibility.
|
||||
pub const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH";
|
||||
|
||||
/// Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and `direct_url.json`) to site-packages `.dist-info` directories.
|
||||
pub const UV_NO_INSTALLER_METADATA: &'static str = "UV_NO_INSTALLER_METADATA";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ members = ["cargo:."]
|
|||
# Config for 'dist'
|
||||
[dist]
|
||||
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
|
||||
cargo-dist-version = "0.28.7-prerelease.1"
|
||||
cargo-dist-version = "0.28.7-prerelease.2"
|
||||
# make a package being included in our releases opt-in instead of opt-out
|
||||
dist = false
|
||||
# CI backends to support
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ $ uv self update
|
|||
!!! tip
|
||||
|
||||
Updating uv will re-run the installer and can modify your shell profiles. To disable this
|
||||
behavior, set `INSTALLER_NO_MODIFY_PATH=1`.
|
||||
behavior, set `UV_NO_MODIFY_PATH=1`.
|
||||
|
||||
When another installation method is used, self-updates are disabled. Use the package manager's
|
||||
upgrade method instead. For example, with `pip`:
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ script, to include the name of the wrapper script in the output file.
|
|||
Equivalent to the `--default-index` command-line argument. If set, uv will use
|
||||
this URL as the default index when searching for packages.
|
||||
|
||||
### `UV_DOWNLOAD_URL`
|
||||
|
||||
The URL from which to download uv using the standalone installer. By default, installs from
|
||||
uv's GitHub Releases. `INSTALLER_DOWNLOAD_URL` is also supported as an alias, for backwards
|
||||
compatibility.
|
||||
|
||||
### `UV_ENV_FILE`
|
||||
|
||||
`.env` files from which to load environment variables when executing `uv run` commands.
|
||||
|
|
@ -269,6 +275,12 @@ Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and
|
|||
|
||||
Disable use of uv-managed Python versions.
|
||||
|
||||
### `UV_NO_MODIFY_PATH`
|
||||
|
||||
Avoid modifying the `PATH` environment variable when installing uv using the standalone
|
||||
installer and `self update` feature. `INSTALLER_NO_MODIFY_PATH` is also supported as an
|
||||
alias, for backwards compatibility.
|
||||
|
||||
### `UV_NO_PROGRESS`
|
||||
|
||||
Equivalent to the `--no-progress` command-line argument. Disables all progress output. For
|
||||
|
|
@ -562,11 +574,6 @@ Proxy for HTTP requests.
|
|||
|
||||
Timeout (in seconds) for HTTP requests. Equivalent to `UV_HTTP_TIMEOUT`.
|
||||
|
||||
### `INSTALLER_NO_MODIFY_PATH`
|
||||
|
||||
Avoid modifying the `PATH` environment variable when installing uv using the standalone
|
||||
installer and `self update` feature.
|
||||
|
||||
### `JPY_SESSION_NAME`
|
||||
|
||||
Used to detect when running inside a Jupyter notebook.
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ To change the installation path, use `UV_INSTALL_DIR`:
|
|||
## Disabling shell modifications
|
||||
|
||||
The installer may also update your shell profiles to ensure the uv binary is on your `PATH`. To
|
||||
disable this behavior, use `INSTALLER_NO_MODIFY_PATH`. For example:
|
||||
disable this behavior, use `UV_NO_MODIFY_PATH`. For example:
|
||||
|
||||
```console
|
||||
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
|
||||
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_NO_MODIFY_PATH=1 sh
|
||||
```
|
||||
|
||||
If installed with `INSTALLER_NO_MODIFY_PATH`, subsequent operations, like `uv self update`, will not
|
||||
modify your shell profiles.
|
||||
If installed with `UV_NO_MODIFY_PATH`, subsequent operations, like `uv self update`, will not modify
|
||||
your shell profiles.
|
||||
|
||||
## Unmanaged installations
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue