Drop the sys-info dependency (#18324)

Part of https://github.com/astral-sh/uv/issues/14574 and
https://github.com/termux/termux-packages/issues/27547

Avoids the downstream patch at
https://github.com/termux/termux-packages/blob/master/packages/uv/0001-sys-info-replace-index-with-strchr.diff

`sys-info-rs` has not been updated in years
https://github.com/FillZpp/sys-info-rs — it includes C code and can't be
built on Termux https://github.com/FillZpp/sys-info-rs/issues/116

I considered switching to https://github.com/GuillaumeGomez/sysinfo but
our usage is trivial, so we implement our requirements in `uv-platform`
instead
This commit is contained in:
Zanie Blue
2026-03-06 10:30:19 -06:00
committed by GitHub
parent ccd1ea99ae
commit 363aea27be
10 changed files with 269 additions and 19 deletions
+6 -2
View File
@@ -1137,8 +1137,12 @@ impl InterpreterInfo {
// invalidate the cache (e.g.) on OS upgrades.
cache_digest(&(
ARCH,
sys_info::os_type().unwrap_or_default(),
sys_info::os_release().unwrap_or_default(),
uv_platform::host::OsType::from_env()
.map(|os_type| os_type.to_string())
.unwrap_or_default(),
uv_platform::host::OsRelease::from_env()
.map(|os_release| os_release.to_string())
.unwrap_or_default(),
)),
// We use the absolute path for the cache entry to avoid cache collisions for relative
// paths. But we don't want to query the executable with symbolic links resolved because