scripts/install.py

branch
eric7-maintenance
changeset 10873
4e8e63df7893
parent 10814
ba20efe10336
parent 10868
ca5cd7faaf5e
child 10892
409d010d7cae
--- a/scripts/install.py	Fri Jul 05 10:15:29 2024 +0200
+++ b/scripts/install.py	Mon Jul 29 14:43:35 2024 +0200
@@ -12,6 +12,7 @@
 import argparse
 import compileall
 import contextlib
+import copy
 import datetime
 import fnmatch
 import getpass
@@ -471,6 +472,7 @@
         "eric7_diff",
         "eric7_doc",
         "eric7_editor",
+        "eric7_fido2",
         "eric7_hexeditor",
         "eric7_iconeditor",
         "eric7_ide",
@@ -722,6 +724,7 @@
         "eric7_configure",
         "eric7_diff",
         "eric7_editor",
+        "eric7_fido2",
         "eric7_hexeditor",
         "eric7_iconeditor",
         "eric7_ide",
@@ -1722,6 +1725,7 @@
         "semver": ("semver", ""),
         "pipdeptree": ("pipdeptree", ""),
         "watchdog": ("watchdog", ">=3.0.0"),
+        "psutil": ("psutil", ""),
     }
     optionalModulesList = {
         # key is pip project name
@@ -1733,9 +1737,16 @@
         "pyenchant": ("enchant", ""),
         "wheel": ("wheel", ""),
         "esprima": ("esprima", ""),
+        "fido2": ("fido2", ""),
     }
     if withPyqt6Tools:
         optionalModulesList["qt6-applications"] = ("qt6_applications", "")
+    optionalWinModulesList = {
+        # key is pip project name
+        # value is tuple of package name, pip install constraint
+        "pywin32": ("win32com", ">=1.0"),
+        "command-runner": ("command_runner", ""),
+    }
 
     # check mandatory PyQt6 modules
     modulesOK = True
@@ -1782,9 +1793,12 @@
     print("\nOptional Packages")
     print("-----------------")
     optionalMissing = False
-    for optPackage in sorted(optionalModulesList):
+    optModulesDict = copy.deepcopy(optionalModulesList)
+    if sys.platform.startswith(("win", "cygwin")):
+        optModulesDict.update(optionalWinModulesList)
+    for optPackage in sorted(optModulesDict):
         try:
-            importlib.import_module(optionalModulesList[optPackage][0])
+            importlib.import_module(optModulesDict[optPackage][0])
             print("Found", optPackage)
         except ImportError as err:
             if isSudo:
@@ -1794,7 +1808,7 @@
                 msg = "Optional '{0}' could not be detected.{1}".format(
                     optPackage, "\nError: {0}".format(err) if verbose else ""
                 )
-                pipInstall(optPackage + optionalModulesList[optPackage][1], msg)
+                pipInstall(optPackage + optModulesDict[optPackage][1], msg)
     if optionalMissing:
         print("Some optional packages are missing and could not be installed.")
         print("Install them manually with:")

eric ide

mercurial