install: modified to allow installation on systems not having QtWebEngine or QtWebKit available.

Thu, 23 Aug 2018 18:11:52 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Aug 2018 18:11:52 +0200
changeset 6476
d13d573c2da4
parent 6475
ed23eb2f20a4
child 6477
096fefd24a26

install: modified to allow installation on systems not having QtWebEngine or QtWebKit available.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Thu Aug 23 17:54:43 2018 +0200
+++ b/install.py	Thu Aug 23 18:11:52 2018 +0200
@@ -1371,7 +1371,10 @@
             "PyQt5.QtSql", "PyQt5.QtSvg", "PyQt5.QtWidgets",
         ]
         altModulesList = [
-            ("PyQt5.QtWebEngineWidgets", "PyQt5.QtWebKitWidgets")
+            # Tuple with alternatives, flag indicating it's ok to not be
+            # available (e.g. for 32-Bit Windows)
+            (("PyQt5.QtWebEngineWidgets", "PyQt5.QtWebKitWidgets"),
+             sys.maxsize <= 2**32),
         ]
     # check mandatory modules
     modulesOK = True
@@ -1389,7 +1392,7 @@
     # check mandatory modules with alternatives
     if altModulesList:
         altModulesOK = True
-        for altModules in altModulesList:
+        for altModules, forcedOk in altModulesList:
             modulesOK = False
             for altModule in altModules:
                 name = altModule.split(".")[1]
@@ -1400,7 +1403,7 @@
                     break
                 except ImportError:
                     pass
-            if not modulesOK:
+            if not modulesOK and not forcedOk:
                 altModulesOK = False
                 print('Sorry, please install {0}.'
                       .format(" or ".join(altModules)))

eric ide

mercurial