mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 23:50:17 +00:00
Add import hooks for PyQwt5.
git-svn-id: http://svn.pyinstaller.org/trunk@649 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
@@ -36,6 +36,7 @@ Changes since PyInstaller 1.3
|
||||
+ Add import hooks for email in Python 2.5 (though it does not support
|
||||
the old-style Python 2.4 syntax with Python 2.5).
|
||||
+ Add import hook for gadfly.
|
||||
+ Add import hook for PyQWt5.
|
||||
+ Improve import hooks for PyGTK (thanks to Marco Bonifazi and foxx).
|
||||
+ Add fix for the very annoying "MSVCRT71 could not be extracted" bug,
|
||||
which was caused by the DLL being packaged twice (thanks to Idris
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
from hooks import hookutils
|
||||
|
||||
hiddenimports = ["PyQt4.QtCore", "PyQt4.QtGui", "PyQt4.QtSvg"]
|
||||
|
||||
if hookutils.qwt_numpy_support():
|
||||
hiddenimports.append("numpy")
|
||||
if hookutils.qwt_numeric_support():
|
||||
hiddenimports.append("Numeric")
|
||||
if hookutils.qwt_numarray_support():
|
||||
hiddenimports.append("numarray")
|
||||
+6
-1
@@ -25,4 +25,9 @@ def qt4_plugins_dir():
|
||||
return exec_statement("from PyQt4.QtCore import QLibraryInfo; print QLibraryInfo.location(QLibraryInfo.PluginsPath)")
|
||||
def mpl_data_dir():
|
||||
return exec_statement("import matplotlib; print matplotlib._get_data_path()")
|
||||
|
||||
def qwt_numpy_support():
|
||||
return eval(exec_statement("from PyQt4 import Qwt5; print hasattr(Qwt5, 'toNumpy')"))
|
||||
def qwt_numeric_support():
|
||||
return eval(exec_statement("from PyQt4 import Qwt5; print hasattr(Qwt5, 'toNumeric')"))
|
||||
def qwt_numarray_support():
|
||||
return eval(exec_statement("from PyQt4 import Qwt5; print hasattr(Qwt5, 'toNumarray')"))
|
||||
|
||||
Reference in New Issue
Block a user