Skip to content

Commit

Permalink
Disable uv cache on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Dec 8, 2024
1 parent 5513f74 commit 59ad440
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
10 changes: 0 additions & 10 deletions .config/nextest.toml

This file was deleted.

15 changes: 12 additions & 3 deletions src/languages/python/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ impl LanguageImpl for Python {

let uv = ensure_uv().await?;

// Set uv cache dir? tools dir? python dir?
let uv_cmd = |summary| {
let mut cmd = Cmd::new(&uv, summary);
// Don't use cache in Windows, multiple uv instances will conflict with each other.
// See https://github.com/astral-sh/uv/issues/8664
#[cfg(windows)]
cmd.env("UV_NO_CACHE", "1");
cmd
};

// TODO: Set uv cache dir? tools dir? python dir?
// Create venv
Cmd::new(&uv, "create venv")
uv_cmd("create venv")
.arg("venv")
.arg(&venv)
.arg("--python")
Expand All @@ -41,7 +50,7 @@ impl LanguageImpl for Python {
patch_cfg_version_info(&venv).await?;

// Install dependencies
Cmd::new(&uv, "install dependencies")
uv_cmd("install dependencies")
.arg("pip")
.arg("install")
.arg(".")
Expand Down

0 comments on commit 59ad440

Please sign in to comment.