scripts/install.py

changeset 7821
12406e6ba24c
parent 7814
6fa40642ed7c
child 7823
9a4e93471a06
--- a/scripts/install.py	Sat Oct 31 12:20:41 2020 +0100
+++ b/scripts/install.py	Sat Oct 31 12:33:51 2020 +0100
@@ -40,6 +40,7 @@
 forceCleanDesktopLinks = False
 doCompile = True
 yes2All = False
+ignorePyqt5Tools = False
 cfg = {}
 progLanguages = ["Python", "Ruby", "QSS"]
 sourceDir = "eric"
@@ -124,11 +125,11 @@
               .format(progName))
     elif sys.platform.startswith(("win", "cygwin")):
         print("    {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file]"
-              " [--clean-desktop] [--no-apis] [--yes]"
+              " [--clean-desktop] [--no-apis] [--no-tools] [--yes]"
               .format(progName))
     else:
         print("    {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]"
-              " [--no-apis] [--yes]"
+              " [--no-apis] [--no-tools] [--yes]"
               .format(progName))
     print("where:")
     print("    -h, --help display this help message")
@@ -157,7 +158,9 @@
         print("               (default: {0})".format(macPythonExe))
     print("    -c         don't cleanup old installation first")
     if sys.platform.startswith(("win", "cygwin")):
-        ("    --clean-desktop delete desktop links before installation")
+        print("    --clean-desktop delete desktop links before installation")
+    if sys.platform != "darwin":
+        print("    --no-tools don't ask for installation of pyqt5-tools")
     print("    -x         don't perform dependency checks (use on your own"
           " risk)")
     print("    -z         don't compile the installed python files")
@@ -1527,7 +1530,7 @@
         (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32),
     ]
     optionalModulesList = {}
-    if sys.platform != "darwin":
+    if sys.platform != "darwin" and not ignorePyqt5Tools:
         optionalModulesList["pyqt5-tools"] = "pyqt5_tools"
     
     # check mandatory modules
@@ -1867,6 +1870,7 @@
     global sourceDir, eric6SourceDir, configName
     global macAppBundlePath, macAppBundleName, macPythonExe
     global installApis, doCleanDesktopLinks, yes2All, installCwd
+    global ignorePyqt5Tools
     
     if sys.version_info < (3, 5, 0) or sys.version_info > (3, 99, 99):
         print('Sorry, eric6 requires at least Python 3.5 for running.')
@@ -1885,7 +1889,7 @@
         if sys.platform.startswith(("win", "cygwin")):
             optlist, args = getopt.getopt(
                 argv[1:], "chxza:b:d:f:",
-                ["help", "no-apis", "yes"])
+                ["help", "no-apis", "no-tools", "yes"])
         elif sys.platform == "darwin":
             optlist, args = getopt.getopt(
                 argv[1:], "chxza:b:d:f:i:m:n:p:",
@@ -1893,7 +1897,7 @@
         else:
             optlist, args = getopt.getopt(
                 argv[1:], "chxza:b:d:f:i:",
-                ["help", "no-apis", "yes"])
+                ["help", "no-apis", "no-tools", "yes"])
     except getopt.GetoptError as err:
         print(err)
         usage()
@@ -1941,6 +1945,8 @@
             doCleanDesktopLinks = True
         elif opt == "--yes":
             yes2All = True
+        elif opt == "--no-tools":
+            ignorePyqt5Tools = True
     
     infoName = ""
     installFromSource = not os.path.isdir(sourceDir)

eric ide

mercurial