scripts/install.py

changeset 8258
82b608e352ec
parent 8254
259484b0fc75
child 8260
2161475d9639
--- a/scripts/install.py	Tue Apr 20 19:47:39 2021 +0200
+++ b/scripts/install.py	Wed Apr 21 17:56:12 2021 +0200
@@ -1017,7 +1017,8 @@
     except ImportError:
         installed = pipInstall(
             "pywin32",
-            "\nThe Python package 'pywin32' could not be imported."
+            "\nThe Python package 'pywin32' could not be imported.",
+            force=False
         )
         if installed:
             # create the links via an external script to get around some
@@ -1334,7 +1335,7 @@
         installInfo["eric_edited"] = False
 
 
-def pipInstall(packageName, message):
+def pipInstall(packageName, message, force=True):
     """
     Install the given package via pip.
     
@@ -1342,13 +1343,16 @@
     @type str
     @param message message to be shown to the user
     @type str
+    @param force flag indicating to perform the installation
+        without asking the user
+    @type bool
     @return flag indicating a successful installation
     @rtype bool
     """
     global yes2All
     
     ok = False
-    if yes2All:
+    if yes2All or force:
         answer = "y"
     else:
         print("{0}\n\nShall '{1}' be installed using pip? (Y/n)"
@@ -1528,8 +1532,15 @@
     optionalModulesList = {
         # key is pip project name
         # value is tuple of package name, pip install constraint
-        "PyYAML": ("yaml", ""),
+        "docutils": ("docutils", ""),
+        "Markdown": ("markdown", ""),
+        "pyyaml": ("yaml", ""),
         "toml": ("toml", ""),
+        "chardet": ("chardet", ""),
+        "asttokens": ("asttokens", ""),
+        "EditorConfig": ("editorconfig", ""),
+        "Send2Trash": ("send2trash", ""),
+        "Pygments": ("pygments", ""),
     }
     # dict with tuples of package name and install constraint
     if sys.platform != "darwin" and not ignorePyqt5Tools:

eric ide

mercurial