1from distutils.core import setup 2 3import shutil 4from glob import glob 5# Remove the build folder 6shutil.rmtree("build", ignore_errors=True) 7shutil.rmtree("dist", ignore_errors=True) 8import py2exe 9import sys 10 11includes = ['PyQt4', 'PyQt4.QtGui', 'PyQt4.QtSvg', 'sip', 'pyqtgraph.graphicsItems'] 12excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger', 13 'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl', 14 'Tkconstants', 'Tkinter', 'zmq'] 15if sys.version[0] == '2': 16 # causes syntax error on py2 17 excludes.append('PyQt4.uic.port_v3') 18 19packages = [] 20dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll', 21 'tk84.dll', 'MSVCP90.dll'] 22icon_resources = [] 23bitmap_resources = [] 24other_resources = [] 25data_files = [] 26setup( 27 data_files=data_files, 28 console=['plotTest.py'] , 29 options={"py2exe": {"excludes": excludes, 30 "includes": includes, 31 "dll_excludes": dll_excludes, 32 "optimize": 0, 33 "compressed": 2, 34 "bundle_files": 1}}, 35 zipfile=None, 36) 37