Skip to content

Commit

Permalink
Fix copy of files from .data dir of wheels if the files already exist
Browse files Browse the repository at this point in the history
Fixes issue pypa#1362
  • Loading branch information
Arnon Yaari committed May 17, 2018
1 parent 5dddf7f commit d991a30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/1362.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix copy of files from .data dir of wheels if the files already exist
2 changes: 2 additions & 0 deletions setuptools/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def unpack(src_dir, dst_dir):
for f in filenames:
src = os.path.join(dirpath, f)
dst = os.path.join(dst_dir, subdir, f)
if os.path.exists(dst):
os.remove(dst)
os.renames(src, dst)
for n, d in reversed(list(enumerate(dirnames))):
src = os.path.join(dirpath, d)
Expand Down

0 comments on commit d991a30

Please sign in to comment.