mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Use shutil.move instead of os.rename
os.rename causes errors to happen whenever the temporary location is on a different device than the wheel cache directory. Using shutil.move instead will cause it to use os.rename when it can and fallback to copying otherwise.
This commit is contained in:
parent
ada5a6d550
commit
31ab024a7d
1 changed files with 1 additions and 1 deletions
|
@ -641,7 +641,7 @@ class WheelBuilder(object):
|
|||
try:
|
||||
wheel_name = os.listdir(tempd)[0]
|
||||
wheel_path = os.path.join(output_dir, wheel_name)
|
||||
os.rename(os.path.join(tempd, wheel_name), wheel_path)
|
||||
shutil.move(os.path.join(tempd, wheel_name), wheel_path)
|
||||
logger.info('Stored in directory: %s', output_dir)
|
||||
return wheel_path
|
||||
except:
|
||||
|
|
Loading…
Reference in a new issue