1102 """ |
1102 """ |
1103 try: |
1103 try: |
1104 # check, if pywin32 is available |
1104 # check, if pywin32 is available |
1105 from win32com.client import Dispatch # __IGNORE_WARNING__ |
1105 from win32com.client import Dispatch # __IGNORE_WARNING__ |
1106 except ImportError: |
1106 except ImportError: |
1107 print( |
1107 installed = pipInstall( |
1108 "\nThe Python package 'pywin32' is not installed. Desktop and" |
1108 "pywin32", |
1109 " Start Menu entries will not be created." |
1109 "\nThe Python package 'pywin32' could not be imported." |
1110 ) |
1110 ) |
|
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: |
|
1123 print( |
|
1124 "\nThe Python package 'pywin32' is not installed. Desktop and" |
|
1125 " Start Menu entries will not be created." |
|
1126 ) |
1111 return |
1127 return |
1112 |
1128 |
1113 regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \ |
1129 regPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer" + \ |
1114 "\\User Shell Folders" |
1130 "\\User Shell Folders" |
1115 |
1131 |
1819 |
1835 |
1820 def main(argv): |
1836 def main(argv): |
1821 """ |
1837 """ |
1822 The main function of the script. |
1838 The main function of the script. |
1823 |
1839 |
1824 @param argv the list of command line arguments. |
1840 @param argv list of command line arguments |
|
1841 @type list of str |
1825 """ |
1842 """ |
1826 import getopt |
1843 import getopt |
1827 |
1844 |
1828 # Parse the command line. |
1845 # Parse the command line. |
1829 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |
1846 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |