scripts/install-debugclients.py

branch
eric7
changeset 8314
e3642a6a1e71
parent 8260
2161475d9639
child 8501
7b5f10581c35
equal deleted inserted replaced
8313:dac33c7fce07 8314:e3642a6a1e71
24 progName = None 24 progName = None
25 currDir = os.getcwd() 25 currDir = os.getcwd()
26 modDir = None 26 modDir = None
27 pyModDir = None 27 pyModDir = None
28 distDir = None 28 distDir = None
29 installPackage = "eric6DebugClients" 29 installPackage = "eric7DebugClients"
30 doCleanup = True 30 doCleanup = True
31 doCompile = True 31 doCompile = True
32 sourceDir = "eric" 32 sourceDir = "eric"
33 eric6SourceDir = os.path.join(sourceDir, "eric6") 33 eric7SourceDir = os.path.join(sourceDir, "eric7")
34 34
35 35
36 def exit(rcode=0): 36 def exit(rcode=0):
37 """ 37 """
38 Exit the install script. 38 Exit the install script.
210 210
211 try: 211 try:
212 # Install the files 212 # Install the files
213 # copy the various parts of eric debug clients 213 # copy the various parts of eric debug clients
214 copyTree( 214 copyTree(
215 os.path.join(eric6SourceDir, "DebugClients"), targetDir, 215 os.path.join(eric7SourceDir, "DebugClients"), targetDir,
216 ['*.py', '*.pyc', '*.pyo', '*.pyw'], 216 ['*.py', '*.pyc', '*.pyo', '*.pyw'],
217 [os.path.join(sourceDir, ".ropeproject")], 217 [os.path.join(sourceDir, ".ropeproject")],
218 excludePatterns=["eric6config.py*"]) 218 excludePatterns=["eric7config.py*"])
219 219
220 # copy the license file 220 # copy the license file
221 shutilCopy(os.path.join(sourceDir, "docs", "LICENSE.GPL3"), targetDir) 221 shutilCopy(os.path.join(sourceDir, "docs", "LICENSE.GPL3"), targetDir)
222 222
223 except OSError as msg: 223 except OSError as msg:
279 doCompile = False 279 doCompile = False
280 280
281 installFromSource = not os.path.isdir(sourceDir) 281 installFromSource = not os.path.isdir(sourceDir)
282 if installFromSource: 282 if installFromSource:
283 sourceDir = os.path.abspath("..") 283 sourceDir = os.path.abspath("..")
284 eric6SourceDir = os.path.join(sourceDir, "eric6") 284 eric7SourceDir = os.path.join(sourceDir, "eric7")
285 285
286 # cleanup source if installing from source 286 # cleanup source if installing from source
287 if installFromSource: 287 if installFromSource:
288 print("Cleaning up source ...") 288 print("Cleaning up source ...")
289 cleanupSource(os.path.join(eric6SourceDir, "DebugClients")) 289 cleanupSource(os.path.join(eric7SourceDir, "DebugClients"))
290 print() 290 print()
291 291
292 # cleanup old installation 292 # cleanup old installation
293 try: 293 try:
294 if doCleanup: 294 if doCleanup:
305 print("\nCompiling source files ...") 305 print("\nCompiling source files ...")
306 skipRe = re.compile(r"DebugClients[\\/]Python[\\/]") 306 skipRe = re.compile(r"DebugClients[\\/]Python[\\/]")
307 sys.stdout = io.StringIO() 307 sys.stdout = io.StringIO()
308 if distDir: 308 if distDir:
309 compileall.compile_dir( 309 compileall.compile_dir(
310 os.path.join(eric6SourceDir, "DebugClients"), 310 os.path.join(eric7SourceDir, "DebugClients"),
311 ddir=os.path.join(distDir, modDir, installPackage), 311 ddir=os.path.join(distDir, modDir, installPackage),
312 rx=skipRe, 312 rx=skipRe,
313 quiet=True) 313 quiet=True)
314 else: 314 else:
315 compileall.compile_dir( 315 compileall.compile_dir(
316 os.path.join(eric6SourceDir, "DebugClients"), 316 os.path.join(eric7SourceDir, "DebugClients"),
317 ddir=os.path.join(modDir, installPackage), 317 ddir=os.path.join(modDir, installPackage),
318 rx=skipRe, 318 rx=skipRe,
319 quiet=True) 319 quiet=True)
320 sys.stdout = sys.__stdout__ 320 sys.stdout = sys.__stdout__
321 print("\nInstalling eric debug clients ...") 321 print("\nInstalling eric debug clients ...")

eric ide

mercurial