mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Rename Unzipper#download
to Unzipper#unzip
(#247)
This commit is contained in:
parent
1f059b30dd
commit
ae203f998a
3 changed files with 5 additions and 5 deletions
|
@ -176,7 +176,7 @@ pub(crate) async fn sync_requirements(
|
|||
.with_reporter(UnzipReporter::from(printer).with_length(downloads.len() as u64));
|
||||
|
||||
let unzips = unzipper
|
||||
.download(downloads, cache.unwrap_or(staging.path()))
|
||||
.unzip(downloads, cache.unwrap_or(staging.path()))
|
||||
.await
|
||||
.context("Failed to download and unpack wheels")?;
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ impl BuildContext for BuildDispatch {
|
|||
downloads.iter().map(ToString::to_string).join(", ")
|
||||
);
|
||||
Unzipper::default()
|
||||
.download(downloads, self.cache.as_deref().unwrap_or(staging.path()))
|
||||
.unzip(downloads, self.cache.as_deref().unwrap_or(staging.path()))
|
||||
.await
|
||||
.context("Failed to unpack build dependencies")?
|
||||
};
|
||||
|
|
|
@ -29,8 +29,8 @@ impl Unzipper {
|
|||
}
|
||||
}
|
||||
|
||||
/// Install a set of wheels into a Python virtual environment.
|
||||
pub async fn download(
|
||||
/// Unzip a set of downloaded wheels.
|
||||
pub async fn unzip(
|
||||
&self,
|
||||
downloads: Vec<InMemoryDistribution>,
|
||||
target: &Path,
|
||||
|
@ -93,7 +93,7 @@ impl Unzipper {
|
|||
}
|
||||
}
|
||||
|
||||
/// Write a wheel into the target directory.
|
||||
/// Unzip a wheel into the target directory.
|
||||
fn unzip_wheel(wheel: InMemoryDistribution, target: &Path) -> Result<()> {
|
||||
// Read the wheel into a buffer.
|
||||
let reader = std::io::Cursor::new(wheel.buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue