mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Build source distributions in the cache directory instead of the global temporary directory (#1628)
Addresses report in https://github.com/astral-sh/uv/issues/1444 where a
temporary directory is created outside of the cache directory or current
virtual environment.
There is one additional usage of bare `tempdir` outside of tests we may
want to change:
2586f655bb/crates/install-wheel-rs/src/wheel.rs (L567)
This commit is contained in:
parent
ceb953be0f
commit
63c313425f
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ use once_cell::sync::Lazy;
|
|||
use pyproject_toml::{BuildSystem, Project};
|
||||
use regex::Regex;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tempfile::{tempdir, tempdir_in, TempDir};
|
||||
use tempfile::{tempdir_in, TempDir};
|
||||
use thiserror::Error;
|
||||
use tokio::process::Command;
|
||||
use tokio::sync::Mutex;
|
||||
|
@ -283,7 +283,7 @@ impl SourceBuild {
|
|||
setup_py: SetupPyStrategy,
|
||||
build_kind: BuildKind,
|
||||
) -> Result<SourceBuild, Error> {
|
||||
let temp_dir = tempdir()?;
|
||||
let temp_dir = tempdir_in(build_context.cache().root())?;
|
||||
|
||||
let metadata = match fs::metadata(source) {
|
||||
Ok(metadata) => metadata,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue