How to use the py2exe.build_exe.py2exe.copy_extensions function in py2exe

To help you get started, we’ve selected a few py2exe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github digiholic / universalSmashSystem / pygame2exe.py View on Github external
def copy_extensions(self, _extensions):
        #Get pygame default font
        pygame_dir = os.path.split(pygame.base.__file__)[0]
        pygame_default_font = os.path.join(pygame_dir, pygame.font.get_default_font())
 
        #Add font to list of extension to be copied
        _extensions.append(Module("pygame.font", pygame_default_font))
        py2exe.build_exe.py2exe.copy_extensions(self, _extensions)
github aarddict / desktop / setup.py View on Github external
def copy_extensions(self, extensions):
            build_exe.copy_extensions(self, extensions)

            # Copy the files to the collection dir.
            # Also add the copied file to the list of compiled
            # files so it will be included in zipfile.
            all_files = ([f for f in glob.glob('aarddict/*.tmpl')] +
                         [f for f in glob.glob('aarddict/*.js')] +
                         [f for f in glob.glob('aarddict/*.png')] +
                         [f for f in glob.glob('aarddict/*.css')] +
                         [f for f in glob.glob('aarddict/locale/*/*/*.mo')] +
                         [f for f in glob.glob('aarddict/locale/*.qm')] +
                         [f for f in glob.glob('aarddict/icons/*/*/*/*.png')]
                         )
            for f in all_files:

                dirname = os.path.dirname(f)
                collect_subdir = os.path.join(self.collect_dir, dirname)
github gamesun / MyTerm / old_ver / setup.py View on Github external
def copy_extensions(self, extensions):
        #super(MediaCollector, self).copy_extensions(extensions)
        build_exe.copy_extensions(self, extensions)

        for folder in CONTENT_DIRS:
            self.addDirectoryToZip(folder)

        for fileName in EXTRA_FILES:
            name = os.path.basename(fileName)
            self.copy_file(fileName, os.path.join(self.collect_dir, name))
            self.compiled_files.append(name)
github StorjOld / dataserv-client / py2exe_MediaCollector.py View on Github external
def copy_extensions(self, extensions):
      build_exe.copy_extensions(self, extensions)

      # lib2to3 files Grammar.txt and PatternGrammar.txt

      # Define the data path where the files reside.
      data_path = os.path.join(lib2to3.__path__[0],'*.txt')

      # Create the subdir where the json files are collected.
      media = os.path.join('lib2to3')
      full = os.path.join(self.collect_dir, media)
      self.mkpath(full)

      # Copy the json files to the collection dir. Also add the copied file
      # to the list of compiled files so it will be included in the zipfile.
      for f in glob.glob(data_path):
         name = os.path.basename(f)
         self.copy_file(f, os.path.join(full, name))
github wackou / smewt / setup.py View on Github external
def copy_extensions(self, extensions):
            """Copy the missing extensions."""
            build_exe.copy_extensions(self, extensions)

            # Create the media subdir where the
            # Python files are collected.
            media = 'guessit' # os.path.join('guessit')
            full = os.path.join(self.collect_dir, media)
            if not os.path.exists(full):
                self.mkpath(full)

            # Copy the media files to the collection dir.
            # Also add the copied file to the list of compiled
            # files so it will be included in zipfile.
            for f in glob.glob(guessit.__path__[0] + '/*.txt'):
                name = os.path.basename(f)
                self.copy_file(f, os.path.join(full, name))
                self.compiled_files.append(os.path.join(media, name))
github dustmop / makechr / res_collector.py View on Github external
def copy_extensions(self, extensions):
    build_exe.copy_extensions(self, extensions)
    source = os.path.join('makechr', 'res')
    target = os.path.join(self.collect_dir, source)
    if not os.path.exists(target):
      self.mkpath(target)
    for f in glob.glob(os.path.join(source, '*')):
      name = os.path.basename(f)
      self.copy_file(f, os.path.join(target, name))
      self.compiled_files.append(os.path.join(source, name))
github StorjOld / storjnode / py2exe_MediaCollector.py View on Github external
def copy_extensions(self, extensions):
      build_exe.copy_extensions(self, extensions)

      # Define the data path where the files reside.
      data_path = os.path.join(jsonschema.__path__[0], 'schemas')

      # Create the subdir where the json files are collected.
      media = os.path.join('jsonschema', 'schemas')
      full = os.path.join(self.collect_dir, media)
      self.mkpath(full)

      # Copy the json files to the collection dir. Also add the copied file
      # to the list of compiled files so it will be included in the zipfile.
      for name in os.listdir(data_path):
         file_name = os.path.join(data_path, name)
         self.copy_file(file_name, os.path.join(full, name))
         self.compiled_files.append(os.path.join(media, name))