install.py

changeset 6594
7ecac3b1c7aa
parent 6593
3d0144c8f77a
child 6636
7ae6bdeb363d
equal deleted inserted replaced
6593:3d0144c8f77a 6594:7ecac3b1c7aa
1106 except ImportError: 1106 except ImportError:
1107 installed = pipInstall( 1107 installed = pipInstall(
1108 "pywin32", 1108 "pywin32",
1109 "\nThe Python package 'pywin32' could not be imported." 1109 "\nThe Python package 'pywin32' could not be imported."
1110 ) 1110 )
1111 if not installed: 1111 if installed:
1112 # create the links via an external script to get around some
1113 # startup magic done by pywin32.pth
1114 args = [
1115 sys.executable,
1116 os.path.join(os.path.dirname(__file__),
1117 "create_windows_links.py"),
1118 ]
1119 if includePythonVariant:
1120 args.append("-y")
1121 subprocess.call(args)
1122 else:
1112 print( 1123 print(
1113 "\nThe Python package 'pywin32' is not installed. Desktop and" 1124 "\nThe Python package 'pywin32' is not installed. Desktop and"
1114 " Start Menu entries will not be created." 1125 " Start Menu entries will not be created."
1115 ) 1126 )
1116 return 1127 return
1117
1118 import site
1119 knownPaths = site.removeduppaths()
1120 knownPaths = site.addusersitepackages(knownPaths)
1121 knownPaths = site.addsitepackages(knownPaths)
1122 1128
1123 regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \ 1129 regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \
1124 "\\User Shell Folders" 1130 "\\User Shell Folders"
1125 1131
1126 # 1. create desktop shortcuts 1132 # 1. create desktop shortcuts
1829 1835
1830 def main(argv): 1836 def main(argv):
1831 """ 1837 """
1832 The main function of the script. 1838 The main function of the script.
1833 1839
1834 @param argv the list of command line arguments. 1840 @param argv list of command line arguments
1841 @type list of str
1835 """ 1842 """
1836 import getopt 1843 import getopt
1837 1844
1838 # Parse the command line. 1845 # Parse the command line.
1839 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir 1846 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir

eric ide

mercurial