Skip to content

Commit 6049556

Browse files
authored
Merge pull request #161 from tower/develop
v0.3.40 release
2 parents 3dd82f4 + 8617d78 commit 6049556

5 files changed

Lines changed: 46 additions & 14 deletions

File tree

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.3.39"
7+
version = "0.3.40"
88
description = "Tower is the best way to host Python data apps in production"
99
rust-version = "1.81"
1010
authors = ["Brad Heller <brad@tower.dev>"]

crates/tower-uv/src/lib.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,38 @@ fn normalize_env_vars(env_vars: &HashMap<String, String>) -> HashMap<String, Str
7171
env_vars.insert("TMP".to_string(), tmp);
7272
}
7373

74+
#[cfg(not(windows))]
75+
{
76+
// Some downstream dependencies require a HOME environment variable to be set.
77+
let home = std::env::var("HOME").unwrap_or_default();
78+
env_vars.insert("HOME".to_string(), home);
79+
80+
// We also need a PATH environment variable often times, we really want the most basic
81+
// thing we can get here but for now we'll pass in the currently-configured one.
82+
let path = std::env::var("PATH").unwrap_or_default();
83+
env_vars.insert("PATH".to_string(), path);
84+
85+
// On Unix systems, we also want to bring along the TMPDIR environment variable for temp
86+
// files.
87+
let tmpdir = std::env::var("TMPDIR").unwrap_or_default();
88+
env_vars.insert("TMPDIR".to_string(), tmpdir);
89+
90+
// Also other potentially-set temp vars. These may not be set.
91+
let temp = std::env::var("TEMP").unwrap_or_default();
92+
env_vars.insert("TEMP".to_string(), temp);
93+
94+
let tmp = std::env::var("TMP").unwrap_or_default();
95+
env_vars.insert("TMP".to_string(), tmp);
96+
97+
// Let's pass in TZ as well to propagate that to child processes.
98+
let tz = std::env::var("TZ").unwrap_or_default();
99+
env_vars.insert("TZ".to_string(), tz);
100+
101+
// And finally locale info, some peeps might need that.
102+
let lang = std::env::var("LANG").unwrap_or_default();
103+
env_vars.insert("LANG".to_string(), lang);
104+
}
105+
74106
env_vars
75107
}
76108

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "tower"
7-
version = "0.3.39"
7+
version = "0.3.40"
88
description = "Tower CLI and runtime environment for Tower."
99
authors = [{ name = "Tower Computing Inc.", email = "brad@tower.dev" }]
1010
readme = "README.md"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)