mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 22:07:47 +00:00
chore(uv): update env vars map to include newly added ones (#8233)
## Summary Add some new env var mappings ## Test Plan Existing tests
This commit is contained in:
parent
98d049407f
commit
b4dca669b4
7 changed files with 38 additions and 7 deletions
|
@ -2,10 +2,20 @@
|
|||
pub struct EnvVars;
|
||||
|
||||
impl EnvVars {
|
||||
/// Equivalent to the `--default-index` argument. Base index URL for searching packages.
|
||||
pub const UV_DEFAULT_INDEX: &'static str = "UV_DEFAULT_INDEX";
|
||||
|
||||
/// Equivalent to the `--index` argument. Additional indexes for searching packages.
|
||||
pub const UV_INDEX: &'static str = "UV_INDEX";
|
||||
|
||||
/// Equivalent to the `--index-url` argument. Base index URL for searching packages.
|
||||
///
|
||||
/// Deprecated: use `UV_DEFAULT_INDEX` instead.
|
||||
pub const UV_INDEX_URL: &'static str = "UV_INDEX_URL";
|
||||
|
||||
/// Equivalent to the `--extra-index-url` argument. Additional indexes for searching packages.
|
||||
///
|
||||
/// Deprecated: use `UV_INDEX` instead.
|
||||
pub const UV_EXTRA_INDEX_URL: &'static str = "UV_EXTRA_INDEX_URL";
|
||||
|
||||
/// Equivalent to the `--find-links` argument. Additional package search locations.
|
||||
|
@ -149,6 +159,16 @@ impl EnvVars {
|
|||
/// Use to control the stack size used by uv. Typically more relevant for Windows in debug mode.
|
||||
pub const UV_STACK_SIZE: &'static str = "UV_STACK_SIZE";
|
||||
|
||||
/// Generates the environment variable key for the HTTP Basic authentication username.
|
||||
pub fn http_basic_username(name: &str) -> String {
|
||||
format!("UV_HTTP_BASIC_{name}_USERNAME")
|
||||
}
|
||||
|
||||
/// Generates the environment variable key for the HTTP Basic authentication password.
|
||||
pub fn http_basic_password(name: &str) -> String {
|
||||
format!("UV_HTTP_BASIC_{name}_PASSWORD")
|
||||
}
|
||||
|
||||
/// Used to set the uv commit hash at build time via `build.rs`.
|
||||
pub const UV_COMMIT_HASH: &'static str = "UV_COMMIT_HASH";
|
||||
|
||||
|
@ -164,6 +184,12 @@ impl EnvVars {
|
|||
/// Used to set the uv tag distance from head at build time via `build.rs`.
|
||||
pub const UV_LAST_TAG_DISTANCE: &'static str = "UV_LAST_TAG_DISTANCE";
|
||||
|
||||
/// Used in tests for testing providing credentials via environment variables.
|
||||
pub const UV_HTTP_BASIC_PROXY_USERNAME: &'static str = "UV_HTTP_BASIC_PROXY_USERNAME";
|
||||
|
||||
/// Used in tests for testing providing credentials via environment variables.
|
||||
pub const UV_HTTP_BASIC_PROXY_PASSWORD: &'static str = "UV_HTTP_BASIC_PROXY_PASSWORD";
|
||||
|
||||
/// Used to set the spawning/parent interpreter when using --system in the test suite.
|
||||
pub const UV_INTERNAL__PARENT_INTERPRETER: &'static str = "UV_INTERNAL__PARENT_INTERPRETER";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue