Advertisement
AceScottie

cx_setup.py

Nov 14th, 2019
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.88 KB | None | 0 0
  1. import sys
  2. from cx_Freeze import setup, Executable
  3. includefiles = ["assets/"] ##includes everyting in the assets folder
  4. packages = ["tkinter", "traceback", "PIL"] #inclides these python modules
  5. excludes = [] #excludes specific custom modules
  6. includes = ["tkutils"] includes specific custom modules
  7.  
  8.  
  9. base = None
  10. if sys.platform == 'win32':
  11.     base = 'Win32GUI'
  12.  
  13. executables = [
  14.     Executable(
  15.     script='main.py', #your script name
  16.     base='Win32GUI', #for windows
  17.     )
  18. ]
  19.  
  20. setup(name='main-setup', #output file name (not needed if using inno,
  21.       version='0.0.0.1', #the version of the build
  22.       description='Test Version of main', #some description
  23.       options = {'build_exe': {'includes':includes,'excludes':excludes,'packages':packages,'include_files':includefiles}},
  24.       executables=executables
  25.       )
  26. #
  27. # To build file into exe
  28. # python .\myfile.py build
  29. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement