Skip to content

Commit f99f7f1

Browse files
authored
Don't copy file if it already exists.
1 parent c9f8ee1 commit f99f7f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def build_extensions(self):
554554
if name1 is not None:
555555
src = os.path.join(self.build_temp, os.path.dirname(ext.sources[0]), name1)
556556
dst = os.path.join(self.build_temp, name2)
557-
if os.path.abspath(src) != os.path.abspath(dst) and os.path.isfile(src):
557+
if os.path.abspath(src) != os.path.abspath(dst) and os.path.isfile(src) and not os.path.isfile(dst):
558558
print('Copying file from: ', src)
559559
print('Copying file to: ', dst)
560560
self.copy_file(src, dst)
@@ -1857,4 +1857,4 @@ def convert_optional_data_files(files):
18571857
('', ('com/pythoncom.py',)),
18581858
('', ('pywin32.pth',)),
18591859
],
1860-
)
1860+
)

0 commit comments

Comments
 (0)