install.py

branch
6_0_x
changeset 4458
757d7591eab0
parent 4381
bde46f229e2c
child 4460
3168cf53729c
equal deleted inserted replaced
4454:71e07bb12292 4458:757d7591eab0
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
482 486
483 def cleanUp(): 487 def cleanUp():
484 """ 488 """
485 Uninstall the old eric files. 489 Uninstall the old eric files.
486 """ 490 """
487 global platBinDir, includePythonVariant 491 global platBinDir, platBinDirOld, includePythonVariant
488 492
489 try: 493 try:
490 from eric6config import getConfig 494 from eric6config import getConfig
491 except ImportError: 495 except ImportError:
492 # eric6 wasn't installed previously 496 # eric6 wasn't installed previously
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)

eric ide

mercurial