Add import hooks for PyQwt5.

git-svn-id: http://svn.pyinstaller.org/trunk@649 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
giovannibajo
2009-04-24 18:24:41 +00:00
parent 680572bde4
commit aecd7cb7b5
3 changed files with 17 additions and 1 deletions
+1
View File
@@ -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
+10
View File
@@ -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
View File
@@ -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')"))