Skip to content

Commit

Permalink
Merge pull request #389 from Czaki/fix_shutil
Browse files Browse the repository at this point in the history
Switch back to shutil.move from Path.rename
  • Loading branch information
joerick authored Jun 25, 2020
2 parents 4189127 + 4dd5c0e commit c88a73b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cibuildwheel/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def build(options: BuildOptions) -> None:
repaired_wheel_dir.mkdir(parents=True)
if built_wheel.name.endswith('none-any.whl') or not options.repair_command:
# pure Python wheel or empty repair command
built_wheel.rename(repaired_wheel_dir / built_wheel.name)
shutil.move(str(built_wheel), repaired_wheel_dir)
else:
repair_command_prepared = prepare_command(options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir)
call(repair_command_prepared, env=env, shell=True)
Expand Down Expand Up @@ -262,4 +262,4 @@ def build(options: BuildOptions) -> None:
shutil.rmtree(venv_dir)

# we're all done here; move it to output (overwrite existing)
repaired_wheel.replace(options.output_dir / repaired_wheel.name)
shutil.move(str(repaired_wheel), options.output_dir)
4 changes: 2 additions & 2 deletions cibuildwheel/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def build(options: BuildOptions) -> None:
repaired_wheel_dir.mkdir(parents=True)
if built_wheel.name.endswith('none-any.whl') or not options.repair_command:
# pure Python wheel or empty repair command
built_wheel.rename(repaired_wheel_dir / built_wheel.name)
shutil.move(str(built_wheel), repaired_wheel_dir)
else:
repair_command_prepared = prepare_command(options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir)
shell([repair_command_prepared], env=env)
Expand Down Expand Up @@ -283,4 +283,4 @@ def build(options: BuildOptions) -> None:
shutil.rmtree(venv_dir)

# we're all done here; move it to output (remove if already exists)
repaired_wheel.replace(options.output_dir / repaired_wheel.name)
shutil.move(str(repaired_wheel), options.output_dir)

0 comments on commit c88a73b

Please sign in to comment.