Merge pull request #95 from anthrotype/overwrite-existing-wheel

overwrite existing wheel file with same name
This commit is contained in:
Joe Rickerby
2018-09-16 19:24:21 +01:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
+3 -2
View File
@@ -130,5 +130,6 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
test_command_prepared = prepare_command(test_command, project=abs_project_dir)
call(test_command_prepared, cwd=os.environ['HOME'], env=env, shell=True)
# we're all done here; move it to output
shutil.move(delocated_wheel, output_dir)
# we're all done here; move it to output (overwrite existing)
dst = os.path.join(output_dir, os.path.basename(delocated_wheel))
shutil.move(delocated_wheel, dst)
+5 -2
View File
@@ -101,5 +101,8 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
test_command_prepared = prepare_command(test_command, project=abs_project_dir)
shell([test_command_prepared], cwd='c:\\', env=env)
# we're all done here; move it to output
shutil.move(built_wheel, output_dir)
# we're all done here; move it to output (remove if already exists)
dst = os.path.join(output_dir, os.path.basename(built_wheel))
if os.path.isfile(dst):
os.remove(dst)
shutil.move(built_wheel, dst)