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 ...") |