1
1
Fork 0
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:
Donald Stufft 2015-05-04 07:47:21 -04:00
parent ada5a6d550
commit 31ab024a7d

View file

@ -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: