1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| # -*- coding: utf-8 -*-
# Python 3
# ___________________________________________________________________________
#
# http://cx-freeze.readthedocs.org/en/latest/distutils.html
# ___________________________________________________________________________
from cx_Freeze import setup, Executable # Create standalone executables from Python scripts
import os # Miscellaneous operating system interfaces
import os.path # Common pathname manipulations
import sys # System-specific parameters and functions
import mon_script as source ##
hide_console_application = False
icon_file = None
if __name__ == '__main__': # {
replace_paths_list = [
(os.path.abspath("."), "."),
]
excludes_list = []
includes_list = []
packages_list = []
include_files_list = []
zip_includes_list = []
bin_includes_list = []
bin_excludes_list = []
bin_path_includes_list = []
if sys.platform == "linux2": bin_path_includes_list += ["/usr/lib"]
bin_path_excludes_list = []
# GUI applications require a different base on Windows (the default is for a console application)
base = None
if sys.platform == "win32": # {
base = "Win32GUI"
# }
executables = [
Executable(
script=source.__file__,
initScript=None,
base=[None, base][hide_console_application],
path=None,
targetDir=None,
targetName=None,
icon=icon_file,
shortcutName=None,
shortcutDir=None
)
]
build_exe_options = {
'optimize': 0,
'excludes': excludes_list,
'includes': includes_list,
'packages': packages_list,
'namespace_packages': [],
'replace_paths': replace_paths_list,
'path': sys.path,
'compressed': True,
'constants': [],
'include_files': include_files_list,
'zip_includes': zip_includes_list,
'bin_includes': bin_includes_list,
'bin_excludes': bin_excludes_list,
'bin_path_includes': bin_path_includes_list,
'bin_path_excludes': bin_path_excludes_list,
'create_shared_zip': False,
'copy_dependent_files': True,
'include_in_shared_zip': False,
'append_script_to_exe': True,
'icon': icon_file,
'silent': False,
}
setup(
options={'build_exe': build_exe_options},
executables=executables,
)
# } __main__ |