Browse Source

deploy-ng: Allow users to define custom package_data_dir items

These are data (i.e., non-code) items copied for modules.
Mitchell Stokes 7 years ago
parent
commit
54655240b6
1 changed files with 6 additions and 1 deletions
  1. 6 1
      direct/src/showutil/dist.py

+ 6 - 1
direct/src/showutil/dist.py

@@ -225,6 +225,7 @@ class build_apps(setuptools.Command):
             'libgl.so.1', 'libx11.so.6', 'libreadline.so.5', 'libncursesw.so.5',
             'libgl.so.1', 'libx11.so.6', 'libreadline.so.5', 'libncursesw.so.5',
             'libbz2.so.1', 'libz.so.1', 'liblzma.so.0', 'librt.so.1', 'libutil.so.1',
             'libbz2.so.1', 'libz.so.1', 'liblzma.so.0', 'librt.so.1', 'libutil.so.1',
         ]
         ]
+        self.package_data_dirs = {}
 
 
         # We keep track of the zip files we've opened.
         # We keep track of the zip files we've opened.
         self._zip_files = {}
         self._zip_files = {}
@@ -287,6 +288,10 @@ class build_apps(setuptools.Command):
         tmp.update(self.file_handlers)
         tmp.update(self.file_handlers)
         self.file_handlers = tmp
         self.file_handlers = tmp
 
 
+        tmp = self.package_data_dirs.copy()
+        tmp.update(self.package_data_dirs)
+        self.package_data_dirs = tmp
+
     def run(self):
     def run(self):
         if not self.platforms:
         if not self.platforms:
             platforms = [p3d.PandaSystem.get_platform()]
             platforms = [p3d.PandaSystem.get_platform()]
@@ -674,7 +679,7 @@ class build_apps(setuptools.Command):
                         shutil.copytree(sub_dir, target_dir)
                         shutil.copytree(sub_dir, target_dir)
 
 
         # Extract any other data files from dependency packages.
         # Extract any other data files from dependency packages.
-        for module, datadesc in PACKAGE_DATA_DIRS.items():
+        for module, datadesc in self.package_data_dirs.items():
             if module not in freezer_modules:
             if module not in freezer_modules:
                 continue
                 continue