From 4dd5c0e11c60ddd75409145ca2e7be46aeeb4afc Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 24 Jun 2020 23:04:15 +0000 Subject: [PATCH] use only dir name as target of shutil.move --- cibuildwheel/macos.py | 4 ++-- cibuildwheel/windows.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 7369bc82..df71f6e4 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -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 - shutil.move(str(built_wheel), str(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) @@ -262,4 +262,4 @@ def build(options: BuildOptions) -> None: shutil.rmtree(venv_dir) # we're all done here; move it to output (overwrite existing) - shutil.move(str(repaired_wheel), str(options.output_dir / repaired_wheel.name)) + shutil.move(str(repaired_wheel), options.output_dir) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 9a6e2b79..92b8005e 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -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 - shutil.move(str(built_wheel), str(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) @@ -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) - shutil.move(str(repaired_wheel), str(options.output_dir / repaired_wheel.name)) + shutil.move(str(repaired_wheel), options.output_dir)