Fix: avoid importing py3 module from pyqt when using py2

This commit is contained in:
Luke Campagnola 2014-04-03 13:33:16 -04:00
parent 0fb5f05fad
commit cae310c570
1 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,10 @@ includes = ['PyQt4', 'PyQt4.QtGui', 'PyQt4.QtSvg', 'sip', 'pyqtgraph.graphicsIte
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
'Tkconstants', 'Tkinter', 'zmq']
if sys.version[0] == '2':
# causes syntax error on py2
excludes.append('PyQt4.uic.port_v3')
packages = []
dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 'tcl84.dll',
'tk84.dll', 'MSVCP90.dll']
@ -25,7 +29,7 @@ setup(
options={"py2exe": {"excludes": excludes,
"includes": includes,
"dll_excludes": dll_excludes,
"optimize": 2,
"optimize": 0,
"compressed": 2,
"bundle_files": 1}},
zipfile=None,