Changes for PyInstaller to build with qtpy and PyQt4
This commit is contained in:
parent
f12022614c
commit
4ac97393c2
|
@ -32,9 +32,14 @@ a = Analysis(
|
|||
'bitmessageqt.languagebox', 'pyopencl', 'numpy', 'win32com',
|
||||
'setuptools.msvc', '_cffi_backend'
|
||||
],
|
||||
hookspath=None,
|
||||
runtime_hooks=None,
|
||||
excludes=['bsddb', 'bz2', 'tcl', 'tk', 'Tkinter']
|
||||
hookspath=None, # this feature has undocumented syntax
|
||||
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-PyQt4-API-Version
|
||||
runtime_hooks=['pyinstaller_rthook_pyqt4.py'],
|
||||
excludes=[
|
||||
'bsddb', 'bz2',
|
||||
'PyQt4.QtOpenGL', 'PyQt4.QtOpenGL', 'PyQt4.QtSql',
|
||||
'PyQt4.QtSvg', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml',
|
||||
'tcl', 'tk', 'Tkinter', 'win32ui']
|
||||
)
|
||||
|
||||
os.rename(
|
||||
|
@ -77,9 +82,8 @@ a.datas += addTranslations()
|
|||
|
||||
|
||||
excluded_binaries = [
|
||||
'QtOpenGL4.dll',
|
||||
'QtSvg4.dll',
|
||||
'QtXml4.dll',
|
||||
'QtOpenGL4.dll', 'QtSql4.dll', 'QtSvg4.dll', 'QtTest4.dll',
|
||||
'QtWebKit4.dll', 'QtXml4.dll'
|
||||
]
|
||||
a.binaries = TOC([x for x in a.binaries if x[0] not in excluded_binaries])
|
||||
|
||||
|
|
10
src/pyinstaller_rthook_pyqt4.py
Normal file
10
src/pyinstaller_rthook_pyqt4.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-PyQt4-API-Version
|
||||
import sip
|
||||
|
||||
sip.setapi(u'QDate', 2)
|
||||
sip.setapi(u'QDateTime', 2)
|
||||
sip.setapi(u'QString', 2)
|
||||
sip.setapi(u'QTextStream', 2)
|
||||
sip.setapi(u'QTime', 2)
|
||||
sip.setapi(u'QUrl', 2)
|
||||
sip.setapi(u'QVariant', 2)
|
Loading…
Reference in New Issue
Block a user