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