mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Avoid removing local wheels when unzipping (#560)
## Summary When installing a local wheel, we need to avoid removing the zipped wheel (since it lives outside of the cache), _and_ need to ensure that we unzip the wheel into the cache (rather than replacing the zipped wheel, which may even live outside of the project). Closes https://github.com/astral-sh/puffin/issues/553.
This commit is contained in:
parent
6f055ecf3b
commit
a15da36d74
7 changed files with 97 additions and 53 deletions
|
@ -427,7 +427,7 @@ impl SourceBuild {
|
|||
|
||||
let from = tmp_dir.path().join(&filename);
|
||||
let to = wheel_dir.join(&filename);
|
||||
if !rename_atomic_sync(from, &to)? {
|
||||
if rename_atomic_sync(from, &to)?.is_some() {
|
||||
warn!("Overwriting existing wheel at: {}", to.display());
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ impl SourceBuild {
|
|||
|
||||
let from = dist_wheel.path();
|
||||
let to = wheel_dir.join(dist_wheel.file_name());
|
||||
if !copy_atomic_sync(from, &to)? {
|
||||
if copy_atomic_sync(from, &to)?.is_some() {
|
||||
warn!("Overwriting existing wheel at: {}", to.display());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue