From e6513a9b281fbdb12c0c2b82b263f47c135af66e Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 16 Jun 2022 10:39:05 -0500 Subject: [PATCH] use Path.unlink() instead of os.unlink() --- cibuildwheel/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 3ae2d204..18ccb04b 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -536,7 +536,7 @@ def build(options: Options, tmp_path: Path) -> None: # we're all done here; move it to output (overwrite existing) if abi3_wheel is None: try: - os.remove(build_options.output_dir / repaired_wheel.name) + (build_options.output_dir / repaired_wheel.name).unlink() except OSError: pass