Skip to content

Commit 27ce67b

Browse files
committed
fix: pyodide missing some logging
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 49829a7 commit 27ce67b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

cibuildwheel/logger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ def print_summary(self) -> None:
202202
string_io = io.StringIO()
203203
ioprint = functools.partial(print, file=string_io)
204204
ioprint("## 🎡: Wheels\n")
205-
ioprint("| Identifier | Wheel | Size | Time |")
206-
ioprint("|===|===|===|===|")
205+
ioprint("| Identifier | Size | Time | Wheel |")
206+
ioprint("| ---------- | ---- | ---- | ----- |")
207207
for ident, filename, duration in self.summary:
208208
if filename:
209209
size_mb = filename.stat().st_size / 1024**2
210-
ioprint(f"| {ident} | {filename.name} | {size_mb:.2f} MB | {duration} |")
210+
ioprint(f"| `{ident}` | {size_mb:.2f} MB | {duration:.0f} s | `{filename.name}` |")
211211
else:
212-
ioprint(f"| {ident} | test only | --- | {duration} |")
212+
ioprint(f"| `{ident}` | --- | {duration:.0f} s | test only |")
213213

214214
if self.summary_mode == "github":
215215
Path(os.environ["GITHUB_STEP_SUMMARY"]).write_text(

cibuildwheel/platforms/pyodide.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44
import os
55
import shutil
6+
import subprocess
67
import sys
78
import tomllib
89
import typing
@@ -445,6 +446,7 @@ def build(options: Options, tmp_path: Path) -> None:
445446
dest_dir=repaired_wheel_dir,
446447
)
447448
shell(repair_command_prepared, env=env)
449+
log.step_end()
448450
else:
449451
shutil.move(str(built_wheel), repaired_wheel_dir)
450452

@@ -538,6 +540,7 @@ def build(options: Options, tmp_path: Path) -> None:
538540
shell(test_command_prepared, cwd=test_cwd, env=virtualenv_env)
539541

540542
# we're all done here; move it to output (overwrite existing)
543+
output_wheel: Path | None = None
541544
if compatible_wheel is None:
542545
output_wheel = build_options.output_dir.joinpath(repaired_wheel.name)
543546
moved_wheel = move_file(repaired_wheel, output_wheel)
@@ -546,6 +549,8 @@ def build(options: Options, tmp_path: Path) -> None:
546549
f"{repaired_wheel} was moved to {moved_wheel} instead of {output_wheel}"
547550
)
548551
built_wheels.append(output_wheel)
552+
log.build_end(output_wheel)
549553

550-
finally:
551-
pass
554+
except subprocess.CalledProcessError as error:
555+
msg = f"Command {error.cmd} failed with code {error.returncode}. {error.stdout or ''}"
556+
raise errors.FatalError(msg) from error

0 commit comments

Comments
 (0)