Extended the dependancy check of the install script because some distributions have Qt4 (or Qt5) cut into a bunch of little pieces.

Sat, 05 Jan 2013 14:21:34 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 05 Jan 2013 14:21:34 +0100
changeset 2312
976dcb82c3e9
parent 2311
b1430a590486
child 2313
ac0b798529d8

Extended the dependancy check of the install script because some distributions have Qt4 (or Qt5) cut into a bunch of little pieces.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Fri Jan 04 17:00:05 2013 +0100
+++ b/install.py	Sat Jan 05 14:21:34 2013 +0100
@@ -801,7 +801,7 @@
     except ImportError as msg:
         print('Sorry, please install QtHelp.')
         print('Error: {0}'.format(msg))
-        sys.exit(1)
+        exit(1)
     print("Found QtHelp")
     
     try:
@@ -813,6 +813,22 @@
         exit(1)
     print("Found QScintilla2")
     
+    for impModule in [
+        "PyQt4.QtGui", "PyQt4.QtNetwork", "PyQt4.QtSql",
+        "PyQt4.QtSvg", "PyQt4.QtWebKit",
+    ]:
+        name = impModule.split(".")[1]
+        modulesOK = True
+        try:
+            __import__(impModule)
+            print("Found", name)
+        except ImportError as msg:
+            print('Sorry, please install {0}.'.format(name))
+            print('Error: {0}'.format(msg))
+            modulesOK = False
+    if not modulesOK:
+        exit(1)
+    
     # determine the platform dependent black list
     if sys.platform.startswith("win"):
         PlatformBlackLists = PlatformsBlackLists["windows"]

eric ide

mercurial