From 2f2d31b041d21aec9c8d3200f695a2848df84033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Thu, 24 Jul 2025 11:11:13 +0200 Subject: [PATCH 1/2] BUG: fix incorrect reporting of number of wheels produced --- cibuildwheel/logger.py | 6 +++--- unit_test/wheel_print_test.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index c2b90775d..ba8d56f33 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -242,11 +242,11 @@ def print_summary(self, *, options: "Options") -> Generator[None, None, None]: github_summary = self._github_step_summary(duration=duration, options=options) Path(summary_path).write_text(filter_ansi_codes(github_summary), encoding="utf-8") - n = len(self.summary) - s = "s" if n > 1 else "" + n_wheels = len([info for info in self.summary if not info.filename]) + s = "s" if n_wheels > 1 else "" duration_str = humanize.naturaldelta(duration) print() - self._start_fold_group(f"{n} wheel{s} produced in {duration_str}") + self._start_fold_group(f"{n_wheels} wheel{s} produced in {duration_str}") for build_info in self.summary: print(" ", build_info) self._end_fold_group() diff --git a/unit_test/wheel_print_test.py b/unit_test/wheel_print_test.py index 9fd8dfcc5..a7989f668 100644 --- a/unit_test/wheel_print_test.py +++ b/unit_test/wheel_print_test.py @@ -25,7 +25,7 @@ def test_printout_wheels(capsys): assert "id1" in captured.out assert "id2" in captured.out - assert "wheels produced in" in captured.out + assert "1 wheel produced in" in captured.out assert "SHA256=" in captured.out From 4221741dc2c94e60b92d4ac8d73e2ae12e0e7d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Thu, 24 Jul 2025 11:12:48 +0200 Subject: [PATCH 2/2] BUG: fix incorrect naming of test only sessions in html summaries --- cibuildwheel/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/logger.py b/cibuildwheel/logger.py index ba8d56f33..0f7df826c 100644 --- a/cibuildwheel/logger.py +++ b/cibuildwheel/logger.py @@ -320,7 +320,7 @@ def _github_step_summary(self, duration: float, options: "Options") -> str: n_wheels = len([b for b in self.summary if b.filename]) wheel_rows = "\n".join( "" - f"{'' + b.filename.name + '' if b.filename else '*Build only*'}" + f"{'' + b.filename.name + '' if b.filename else '*Test only*'}" f"{b.size or 'N/A'}" f"{b.identifier}" f"{humanize.naturaldelta(b.duration)}"