Skip to content

Commit

Permalink
fix overwriting wheel on windows
Browse files Browse the repository at this point in the history
This is the same fix as pypa#1129 but for Windows this time.
  • Loading branch information
dlech committed Apr 8, 2023
1 parent d018570 commit fc76eb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cibuildwheel/windows.py
Expand Up @@ -560,6 +560,11 @@ def build(options: Options, tmp_path: Path) -> None:

# we're all done here; move it to output (remove if already exists)
if compatible_wheel is None:
try:
(build_options.output_dir / repaired_wheel.name).unlink()
except FileNotFoundError:
pass

shutil.move(str(repaired_wheel), build_options.output_dir)
built_wheels.append(build_options.output_dir / repaired_wheel.name)

Expand Down

0 comments on commit fc76eb2

Please sign in to comment.