224 def initGlobals(): |
224 def initGlobals(): |
225 """ |
225 """ |
226 Module function to set the values of globals that need more than a |
226 Module function to set the values of globals that need more than a |
227 simple assignment. |
227 simple assignment. |
228 """ |
228 """ |
229 global platBinDir, modDir, pyModDir, apisDir, pyqtVariant |
229 global platBinDir, modDir, pyModDir, apisDir, pyqtVariant, platBinDirOld |
230 |
230 |
231 if sys.platform.startswith("win"): |
231 if sys.platform.startswith("win"): |
232 platBinDir = sys.exec_prefix |
232 platBinDir = sys.exec_prefix |
233 if platBinDir.endswith("\\"): |
233 if platBinDir.endswith("\\"): |
234 platBinDir = platBinDir[:-1] |
234 platBinDir = platBinDir[:-1] |
|
235 platBinDirOld = platBinDir |
|
236 platBinDir = os.path.join(platBinDir, "Scripts") |
|
237 if not os.path.exists(platBinDir): |
|
238 platBinDir = platBinDirOld |
235 else: |
239 else: |
236 platBinDir = "/usr/local/bin" |
240 platBinDir = "/usr/local/bin" |
237 |
241 |
238 modDir = distutils.sysconfig.get_python_lib(True) |
242 modDir = distutils.sysconfig.get_python_lib(True) |
239 pyModDir = modDir |
243 pyModDir = modDir |
528 if includePythonVariant: |
532 if includePythonVariant: |
529 marker = PythonMarkers[sys.version_info.major] |
533 marker = PythonMarkers[sys.version_info.major] |
530 rem_wnames = [n + marker for n in rem_wnames] |
534 rem_wnames = [n + marker for n in rem_wnames] |
531 |
535 |
532 try: |
536 try: |
|
537 dirs = [platBinDir, getConfig('bindir')] |
|
538 if platBinDirOld: |
|
539 dirs.append(platBinDirOld) |
533 for rem_wname in rem_wnames: |
540 for rem_wname in rem_wnames: |
534 for d in [platBinDir, getConfig('bindir')]: |
541 for d in dirs: |
535 rwname = wrapperName(d, rem_wname) |
542 rwname = wrapperName(d, rem_wname) |
536 if os.path.exists(rwname): |
543 if os.path.exists(rwname): |
537 os.remove(rwname) |
544 os.remove(rwname) |
538 |
545 |
539 # Cleanup our config file(s) |
546 # Cleanup our config file(s) |