install.py

changeset 6594
7ecac3b1c7aa
parent 6593
3d0144c8f77a
child 6636
7ae6bdeb363d
--- a/install.py	Sat Nov 17 18:12:20 2018 +0100
+++ b/install.py	Sat Nov 17 19:36:46 2018 +0100
@@ -1108,17 +1108,23 @@
             "pywin32",
             "\nThe Python package 'pywin32' could not be imported."
         )
-        if not installed:
+        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
-        
-        import site
-        knownPaths = site.removeduppaths()
-        knownPaths = site.addusersitepackages(knownPaths)
-        knownPaths = site.addsitepackages(knownPaths)
+        return
     
     regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \
               "\\User Shell Folders"
@@ -1831,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