scripts/install-debugclients.py

branch
eric7
changeset 9694
90a7081e2837
parent 9690
2dc33116df50
child 10091
ac6edcfe7831
equal deleted inserted replaced
9693:a7e9fd398e5a 9694:90a7081e2837
438 else os.path.join(sourceDir, "src", "eric7") 438 else os.path.join(sourceDir, "src", "eric7")
439 ) 439 )
440 440
441 # cleanup source if installing from source 441 # cleanup source if installing from source
442 if installFromSource: 442 if installFromSource:
443 print("Cleaning up source ...", end="") 443 print("Cleaning up source ...", end="", flush=True)
444 cleanupSource(os.path.join(eric7SourceDir, "DebugClients")) 444 cleanupSource(os.path.join(eric7SourceDir, "DebugClients"))
445 print(" Done") 445 print(" Done")
446 446
447 # cleanup old installation 447 # cleanup old installation
448 try: 448 try:
449 if doCleanup: 449 if doCleanup:
450 print("Cleaning up old installation ...", end="") 450 print("Cleaning up old installation ...", end="", flush=True)
451 if distDir: 451 if distDir:
452 shutil.rmtree(distDir, True) 452 shutil.rmtree(distDir, True)
453 else: 453 else:
454 cleanUp() 454 cleanUp()
455 print(" Done") 455 print(" Done")
456 except OSError as msg: 456 except OSError as msg:
457 sys.stderr.write("Error: {0}\nTry install as root.\n".format(msg)) 457 sys.stderr.write("Error: {0}\nTry install as root.\n".format(msg))
458 exit(7) 458 exit(7)
459 459
460 if doCompile: 460 if doCompile:
461 print("Compiling source files ...", end="") 461 print("Compiling source files ...", end="", flush=True)
462 skipRe = re.compile(r"DebugClients[\\/]Python[\\/]") 462 skipRe = re.compile(r"DebugClients[\\/]Python[\\/]")
463 sys.stdout = io.StringIO() 463 sys.stdout = io.StringIO()
464 if distDir: 464 if distDir:
465 compileall.compile_dir( 465 compileall.compile_dir(
466 os.path.join(eric7SourceDir, "DebugClients"), 466 os.path.join(eric7SourceDir, "DebugClients"),
476 quiet=True, 476 quiet=True,
477 ) 477 )
478 sys.stdout = sys.__stdout__ 478 sys.stdout = sys.__stdout__
479 print(" Done") 479 print(" Done")
480 480
481 print("Installing eric debug clients ...", end="") 481 print("Installing eric debug clients ...", end="", flush=True)
482 res = installEricDebugClients() 482 res = installEricDebugClients()
483 print(" Done") 483 print(" Done")
484 484
485 print("Installation complete.") 485 print("Installation complete.")
486 print() 486 print()

eric ide

mercurial