Skip to content

Commit c022fa3

Browse files
authored
Merge pull request #1129 from dlech/patch-1
fix overwriting wheel on macos
2 parents f1c2d6c + 9f4303b commit c022fa3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cibuildwheel/macos.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,11 @@ def build(options: Options, tmp_path: Path) -> None:
535535

536536
# we're all done here; move it to output (overwrite existing)
537537
if abi3_wheel is None:
538+
try:
539+
(build_options.output_dir / repaired_wheel.name).unlink()
540+
except FileNotFoundError:
541+
pass
542+
538543
shutil.move(str(repaired_wheel), build_options.output_dir)
539544
built_wheels.append(build_options.output_dir / repaired_wheel.name)
540545

0 commit comments

Comments
 (0)