Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "0.3.39"
version = "0.3.40"
description = "Tower is the best way to host Python data apps in production"
rust-version = "1.81"
authors = ["Brad Heller <brad@tower.dev>"]
Expand Down
32 changes: 32 additions & 0 deletions crates/tower-uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,38 @@ fn normalize_env_vars(env_vars: &HashMap<String, String>) -> HashMap<String, Str
env_vars.insert("TMP".to_string(), tmp);
}

#[cfg(not(windows))]
{
// Some downstream dependencies require a HOME environment variable to be set.
let home = std::env::var("HOME").unwrap_or_default();
env_vars.insert("HOME".to_string(), home);

// We also need a PATH environment variable often times, we really want the most basic
// thing we can get here but for now we'll pass in the currently-configured one.
let path = std::env::var("PATH").unwrap_or_default();
env_vars.insert("PATH".to_string(), path);

// On Unix systems, we also want to bring along the TMPDIR environment variable for temp
// files.
let tmpdir = std::env::var("TMPDIR").unwrap_or_default();
env_vars.insert("TMPDIR".to_string(), tmpdir);

// Also other potentially-set temp vars. These may not be set.
let temp = std::env::var("TEMP").unwrap_or_default();
env_vars.insert("TEMP".to_string(), temp);

let tmp = std::env::var("TMP").unwrap_or_default();
env_vars.insert("TMP".to_string(), tmp);

// Let's pass in TZ as well to propagate that to child processes.
let tz = std::env::var("TZ").unwrap_or_default();
env_vars.insert("TZ".to_string(), tz);

// And finally locale info, some peeps might need that.
let lang = std::env::var("LANG").unwrap_or_default();
env_vars.insert("LANG".to_string(), lang);
}

env_vars
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "tower"
version = "0.3.39"
version = "0.3.40"
description = "Tower CLI and runtime environment for Tower."
authors = [{ name = "Tower Computing Inc.", email = "brad@tower.dev" }]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.