Browse Source

makepanda: fix unnecessary re-copy of unmodified direct files

rdb 6 years ago
parent
commit
c52db7239b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      makepanda/makepandacore.py

+ 1 - 1
makepanda/makepandacore.py

@@ -3165,7 +3165,7 @@ def CopyPythonTree(dstdir, srcdir, lib2to3_fixers=[], threads=0):
                 if (NeedsBuild([dstpth], [srcpth])):
                 if (NeedsBuild([dstpth], [srcpth])):
                     WriteBinaryFile(dstpth, ReadBinaryFile(srcpth))
                     WriteBinaryFile(dstpth, ReadBinaryFile(srcpth))
 
 
-                    if ext == '.py' and not entry.endswith('-extensions.py'):
+                    if ext == '.py' and not entry.endswith('-extensions.py') and lib2to3 is not None:
                         refactor.append((dstpth, srcpth))
                         refactor.append((dstpth, srcpth))
                         lib2to3_args.append(dstpth)
                         lib2to3_args.append(dstpth)
                     else:
                     else: