Ignore:
Timestamp:
05/16/19 20:08:42 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

py2exe patch modified so that py2exe properly creates directory for module data files (re #347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docker/msys/py2exe.patch

    r936 r971  
    379379                 print("Building shared code archive '%s'." % libpath)
    380380             # Archive is appended to resources.dll; remove the icon
    381 @@ -263,7 +266,7 @@ class Runtime(object):
    382  
    383          self.copy_files(destdir)
    384  
    385 -        # data directories from modulefinder
    386 +        # data directories from modulefinder
    387          for name, (src, recursive) in self.mf._data_directories.items():
    388              if recursive:
    389                  dst = os.path.join(destdir, name)
    390 @@ -274,11 +277,11 @@ class Runtime(object):
     381@@ -274,11 +277,12 @@ class Runtime(object):
    391382             else:
    392383                 raise RuntimeError("not yet supported")
    393  
    394 -        # data files from modulefinder
    395 -        for name, src in self.mf._data_files.items():
    396 -            dst = os.path.join(destdir, name)
    397 -            shutil.copy2(src, dst)
    398 -
    399 +        # data files from modulefinder
    400 +        for name, src in self.mf._data_files.items():
    401 +            dst = os.path.join(destdir, name)
    402 +            shutil.copy2(src, dst)
    403 +
     384
     385         # data files from modulefinder
     386         for name, src in self.mf._data_files.items():
     387             dst = os.path.join(destdir, name)
     388+            os.makedirs(dst, exist_ok=True)
     389             shutil.copy2(src, dst)
     390
    404391         # other data files
    405392         if self.options.data_files:
Note: See TracChangeset for help on using the changeset viewer.