Rename Unzipper#download to Unzipper#unzip (#247)

This commit is contained in:
Charlie Marsh 2023-10-30 18:19:27 -07:00 committed by GitHub
parent 1f059b30dd
commit ae203f998a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -176,7 +176,7 @@ pub(crate) async fn sync_requirements(
.with_reporter(UnzipReporter::from(printer).with_length(downloads.len() as u64)); .with_reporter(UnzipReporter::from(printer).with_length(downloads.len() as u64));
let unzips = unzipper let unzips = unzipper
.download(downloads, cache.unwrap_or(staging.path())) .unzip(downloads, cache.unwrap_or(staging.path()))
.await .await
.context("Failed to download and unpack wheels")?; .context("Failed to download and unpack wheels")?;

View file

@ -163,7 +163,7 @@ impl BuildContext for BuildDispatch {
downloads.iter().map(ToString::to_string).join(", ") downloads.iter().map(ToString::to_string).join(", ")
); );
Unzipper::default() Unzipper::default()
.download(downloads, self.cache.as_deref().unwrap_or(staging.path())) .unzip(downloads, self.cache.as_deref().unwrap_or(staging.path()))
.await .await
.context("Failed to unpack build dependencies")? .context("Failed to unpack build dependencies")?
}; };

View file

@ -29,8 +29,8 @@ impl Unzipper {
} }
} }
/// Install a set of wheels into a Python virtual environment. /// Unzip a set of downloaded wheels.
pub async fn download( pub async fn unzip(
&self, &self,
downloads: Vec<InMemoryDistribution>, downloads: Vec<InMemoryDistribution>,
target: &Path, 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<()> { fn unzip_wheel(wheel: InMemoryDistribution, target: &Path) -> Result<()> {
// Read the wheel into a buffer. // Read the wheel into a buffer.
let reader = std::io::Cursor::new(wheel.buffer); let reader = std::io::Cursor::new(wheel.buffer);