install.py

branch
maintenance
changeset 6602
331ac8f99cf8
parent 6594
7ecac3b1c7aa
child 6636
7ae6bdeb363d
diff -r 06e7d2941ead -r 331ac8f99cf8 install.py
--- a/install.py	Thu Nov 01 11:48:02 2018 +0100
+++ b/install.py	Sat Dec 01 11:44:34 2018 +0100
@@ -1104,10 +1104,26 @@
         # check, if pywin32 is available
         from win32com.client import Dispatch    # __IGNORE_WARNING__
     except ImportError:
-        print(
-            "\nThe Python package 'pywin32' is not installed. Desktop and"
-            " Start Menu entries will not be created."
+        installed = pipInstall(
+            "pywin32",
+            "\nThe Python package 'pywin32' could not be imported."
         )
+        if installed:
+            # create the links via an external script to get around some
+            # startup magic done by pywin32.pth
+            args = [
+                sys.executable,
+                os.path.join(os.path.dirname(__file__),
+                             "create_windows_links.py"),
+            ]
+            if includePythonVariant:
+                args.append("-y")
+            subprocess.call(args)
+        else:
+            print(
+                "\nThe Python package 'pywin32' is not installed. Desktop and"
+                " Start Menu entries will not be created."
+            )
         return
     
     regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \
@@ -1821,7 +1837,8 @@
     """
     The main function of the script.
 
-    @param argv the list of command line arguments.
+    @param argv list of command line arguments
+    @type list of str
     """
     import getopt
 

eric ide

mercurial