Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/update_how_it_works_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def main() -> None:
)

dest_path = Path("docs/data/how-it-works.png")
if dest_path.exists():
dest_path.unlink()
dest_path.unlink(missing_ok=True)

Path(screenshot).rename(dest_path)

Expand Down
3 changes: 1 addition & 2 deletions cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ def build_in_directory(args: CommandLineArguments) -> None:

output_dir = options.globals.output_dir

if not output_dir.exists():
output_dir.mkdir(parents=True)
output_dir.mkdir(parents=True, exist_ok=True)

tmp_path = Path(mkdtemp(prefix="cibw-run-")).resolve(strict=True)
try:
Expand Down
3 changes: 1 addition & 2 deletions cibuildwheel/util/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
def download(url: str, dest: Path) -> None:
print(f"+ Download {url} to {dest}")
dest_dir = dest.parent
if not dest_dir.exists():
dest_dir.mkdir(parents=True)
dest_dir.mkdir(parents=True, exist_ok=True)

# we've had issues when relying on the host OS' CA certificates on Windows,
# so we use certifi (this sounds odd but requests also does this by default)
Expand Down
3 changes: 1 addition & 2 deletions test/test_custom_repair_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
name = f"spam-0.1.0-py2-none-{platform}.whl"
dest = dest_dir / name
dest_dir.mkdir(parents=True, exist_ok=True)
if dest.exists():
dest.unlink()
dest.unlink(missing_ok=True)
Copy link
Contributor

@joerick joerick Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one won't work, because missing_ok was added in Python 3.8, and the repair script runs in the build, so runs on 3.6 and 3.7.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it would be fine after #2282?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased on main and added this back in. Let's see if CI passes!

shutil.copy(wheel, dest)
"""

Expand Down
Loading