install.py: added a forgotten check for PyQt5 >= 5.12 before trying to install PyQtWebEngine via pip.

Fri, 18 Jan 2019 19:01:33 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 18 Jan 2019 19:01:33 +0100
changeset 6660
fd767acf3e98
parent 6659
f6c059deb5ea
child 6661
19fcbb7be3da

install.py: added a forgotten check for PyQt5 >= 5.12 before trying to install PyQtWebEngine via pip.

install.py file | annotate | diff | comparison | revisions
--- a/install.py	Wed Jan 16 19:49:48 2019 +0100
+++ b/install.py	Fri Jan 18 19:01:33 2019 +0100
@@ -1472,10 +1472,14 @@
         try:
             from PyQt5 import QtWebEngineWidgets    # __IGNORE_WARNING__
         except ImportError as msg:
-            installed = pipInstall(
-                "PyQtWebEngine",
-                "PyQtWebEngine could not be detected.\nError: {0}".format(msg)
-            )
+            from PyQt5.QtCore import PYQT_VERSION
+            if PYQT_VERSION >= 0x50c00:
+                # PyQt 5.12 separated QtWebEngine into a separate wheel
+                installed = pipInstall(
+                    "PyQtWebEngine",
+                    "PyQtWebEngine could not be detected.\nError: {0}"
+                    .format(msg)
+                )
     
     try:
         if pyqtVariant == "PyQt4":

eric ide

mercurial