Created
May 23, 2018 14:16
-
-
Save devsnd/7809a958a3549a374a0ab793c86e2619 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cx_Freeze import setup, Executable | |
# Dependencies are automatically detected, but it might need | |
# fine tuning. | |
buildOptions = { | |
'packages': [], | |
'excludes': [ | |
# remove unneeded parts of the standard lib | |
'unicodedata', | |
'pydoc', | |
'distutils', | |
'email', | |
'pyreadline', | |
'difflib', | |
'doctest', | |
'locale', | |
'optparse', | |
'argparse', | |
'pickle', | |
'calendar', | |
'tkinter', | |
'_ssl', | |
], | |
'optimize': 2, | |
# https://stackoverflow.com/a/44429619/1191373 | |
"zip_include_packages": "*", | |
"zip_exclude_packages": "" | |
} | |
base = 'Console' | |
executables = [ | |
Executable('your_python_script.py', base=base) | |
] | |
setup( | |
name='yourProjectName', | |
version='1.0', | |
description='Description', | |
options={'build_exe': buildOptions}, | |
executables=executables | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment