setup.py, install.py: fixed PyQt version to < 5.15.2 in order to get a working config on Debian.

Sun, 21 Feb 2021 12:53:26 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 21 Feb 2021 12:53:26 +0100
changeset 8127
9534be896b85
parent 8126
e7278bf7168f
child 8128
8f012c58f27e

setup.py, install.py: fixed PyQt version to < 5.15.2 in order to get a working config on Debian.

scripts/install.py file | annotate | diff | comparison | revisions
setup.py file | annotate | diff | comparison | revisions
--- a/scripts/install.py	Sun Feb 21 12:28:58 2021 +0100
+++ b/scripts/install.py	Sun Feb 21 12:53:26 2021 +0100
@@ -1451,7 +1451,7 @@
         from PyQt5.QtCore import qVersion
     except ImportError as msg:
         installed = not isSudo and pipInstall(
-            "PyQt5",
+            "PyQt5>=5.12.1,<5.15.2",
             "'PyQt5' could not be detected.\nError: {0}".format(msg)
         )
         if installed:
@@ -1487,7 +1487,7 @@
                 print("Optional 'PyQtWebEngine' could not be detected.")
             else:
                 pipInstall(
-                    "PyQtWebEngine",
+                    "PyQtWebEngine>=5.12.1,<5.15.2",
                     "Optional 'PyQtWebEngine' could not be detected.\n"
                     "Error: {0}".format(msg)
                 )
@@ -1499,7 +1499,7 @@
             print("Optional 'PyQtChart' could not be detected.")
         else:
             pipInstall(
-                "PyQtChart",
+                "PyQtChart>=5.12.1,<5.15.2",
                 "Optional 'PyQtChart' could not be detected.\n"
                 "Error: {0}".format(msg)
             )
@@ -1537,8 +1537,10 @@
         (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32),
     ]
     optionalModulesList = {}
+    # dict with tuples of package name and install constraint
     if sys.platform != "darwin" and not ignorePyqt5Tools:
-        optionalModulesList["qt5-applications"] = "qt5_applications"
+        optionalModulesList["qt5-applications"] = ("qt5_applications",
+                                                   "<5.15.2")
     
     # check mandatory modules
     modulesOK = True
@@ -1576,7 +1578,7 @@
     # check optional modules
     for optPackage in optionalModulesList:
         try:
-            __import__(optionalModulesList[optPackage])
+            __import__(optionalModulesList[optPackage][0])
             print("Found", optPackage)
         except ImportError as msg:
             if isSudo:
@@ -1584,7 +1586,7 @@
                       .format(optPackage))
             else:
                 pipInstall(
-                    optPackage,
+                    optPackage + optionalModulesList[optPackage][1],
                     "Optional '{0}' could not be detected.\n"
                     "Error: {1}".format(optPackage, msg)
                 )
--- a/setup.py	Sun Feb 21 12:28:58 2021 +0100
+++ b/setup.py	Sun Feb 21 12:53:26 2021 +0100
@@ -340,9 +340,9 @@
     install_requires=[
         "pip>=19.0",
         "wheel",
-        "PyQt5>=5.12.1",
-        "PyQtChart>=5.12.1",
-        "PyQtWebEngine>=5.12.1",
+        "PyQt5>=5.12.1,<5.15.2",
+        "PyQtChart>=5.12.1,<5.15.2",
+        "PyQtWebEngine>=5.12.1,<5.15.2",
         "QScintilla>=2.11.1",
         "docutils",
         "Markdown",

eric ide

mercurial