From 4e05cd5dfdc62fa5736ed47e6eeafc38d89f59e1 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 4 Dec 2023 15:56:56 -0500 Subject: [PATCH] Show build progress for path source distributions (#549) --- crates/puffin-distribution/src/source_dist.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/puffin-distribution/src/source_dist.rs b/crates/puffin-distribution/src/source_dist.rs index 611d8874b..23d561558 100644 --- a/crates/puffin-distribution/src/source_dist.rs +++ b/crates/puffin-distribution/src/source_dist.rs @@ -185,6 +185,11 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> { .join(source_dist.distribution_id()); fs::create_dir_all(&wheel_dir).await?; + let task = self + .reporter + .as_ref() + .map(|reporter| reporter.on_build_start(source_dist)); + // Build the wheel. let disk_filename = self .build_context @@ -202,6 +207,12 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> { let path = wheel_dir.join(disk_filename); let metadata = read_metadata(&filename, &path)?; + if let Some(task) = task { + if let Some(reporter) = self.reporter.as_ref() { + reporter.on_build_complete(source_dist, task); + } + } + BuiltWheelMetadata { path, filename,