Python cx_Freeze.setup() Examples
The following are 3
code examples of cx_Freeze.setup().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
cx_Freeze
, or try the search function
.
Example #1
Source File: disthelpers.py From winpython with MIT License | 5 votes |
def build_cx_freeze( self, cleanup=True, create_archive=None ): """Build executable with cx_Freeze cleanup: remove 'build/dist' directories before building distribution create_archive (requires the executable `zip`): * None or False: do nothing * 'add': add target directory to a ZIP archive * 'move': move target directory to a ZIP archive """ assert ( not self._py2exe_is_loaded ), "cx_Freeze can't be executed after py2exe" from cx_Freeze import setup if cleanup: self.__cleanup() sys.argv += ["build"] build_exe = dict( include_files=to_include_files(self.data_files), includes=self.includes, excludes=self.excludes, bin_excludes=self.bin_excludes, bin_includes=self.bin_includes, bin_path_includes=self.bin_path_includes, bin_path_excludes=self.bin_path_excludes, build_exe=self.target_dir, ) setup( name=self.name, version=self.version, description=self.description, executables=self.executables, options=dict(build_exe=build_exe), ) if create_archive: self.__create_archive(create_archive)
Example #2
Source File: package.py From mysql-utilities with GNU General Public License v2.0 | 5 votes |
def main(): """main""" cx_Freeze.setup(**SETUP_ARGS)
Example #3
Source File: disthelpers.py From winpython with MIT License | 4 votes |
def build_py2exe( self, cleanup=True, compressed=2, optimize=2, company_name=None, copyright=None, create_archive=None, ): """Build executable with py2exe cleanup: remove 'build/dist' directories before building distribution create_archive (requires the executable `zip`): * None or False: do nothing * 'add': add target directory to a ZIP archive * 'move': move target directory to a ZIP archive """ from distutils.core import setup import py2exe # Patching distutils -- analysis:ignore self._py2exe_is_loaded = True if cleanup: self.__cleanup() sys.argv += ["py2exe"] options = dict( compressed=compressed, optimize=optimize, includes=self.includes, excludes=self.excludes, dll_excludes=self.bin_excludes, dist_dir=self.target_dir, ) windows = dict( name=self.name, description=self.description, script=self.script, icon_resources=[(0, self.icon)], bitmap_resources=[], other_resources=[], dest_base=osp.splitext(self.target_name)[0], version=self.version, company_name=company_name, copyright=copyright, ) setup( data_files=self.data_files, windows=[windows], options=dict(py2exe=options), ) if create_archive: self.__create_archive(create_archive)