mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-29 13:34:47 +00:00
Make puffin-fs
tokio
dependency opt-in (#1100)
This commit is contained in:
parent
5ad2e60561
commit
e0902d7d5a
4 changed files with 8 additions and 3 deletions
|
@ -12,7 +12,7 @@ pep440_rs = { path = "../pep440-rs" }
|
|||
pep508_rs = { path = "../pep508-rs" }
|
||||
platform-tags = { path = "../platform-tags" }
|
||||
puffin-cache = { path = "../puffin-cache" }
|
||||
puffin-fs = { path = "../puffin-fs" }
|
||||
puffin-fs = { path = "../puffin-fs", features = ["tokio"] }
|
||||
puffin-normalize = { path = "../puffin-normalize" }
|
||||
pypi-types = { path = "../pypi-types" }
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ platform-tags = { path = "../platform-tags" }
|
|||
puffin-cache = { path = "../puffin-cache" }
|
||||
puffin-client = { path = "../puffin-client" }
|
||||
puffin-extract = { path = "../puffin-extract" }
|
||||
puffin-fs = { path = "../puffin-fs" }
|
||||
puffin-fs = { path = "../puffin-fs", features = ["tokio"] }
|
||||
puffin-git = { path = "../puffin-git", features = ["vendored-openssl"] }
|
||||
puffin-normalize = { path = "../puffin-normalize" }
|
||||
puffin-traits = { path = "../puffin-traits" }
|
||||
|
|
|
@ -16,8 +16,12 @@ workspace = true
|
|||
puffin-warnings = { path = "../puffin-warnings" }
|
||||
|
||||
dunce = { workspace = true }
|
||||
fs-err = { workspace = true, features = ["tokio"] }
|
||||
fs-err = { workspace = true }
|
||||
fs2 = { workspace = true }
|
||||
junction = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
tokio = ["fs-err/tokio"]
|
||||
|
|
|
@ -51,6 +51,7 @@ pub fn replace_symlink(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> std::io:
|
|||
}
|
||||
|
||||
/// Write `data` to `path` atomically using a temporary file and atomic rename.
|
||||
#[cfg(feature = "tokio")]
|
||||
pub async fn write_atomic(path: impl AsRef<Path>, data: impl AsRef<[u8]>) -> std::io::Result<()> {
|
||||
let temp_file = NamedTempFile::new_in(
|
||||
path.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue