1 #!/usr/bin/env python3 |
1 #!/usr/bin/env python3 |
2 # -*- coding: utf-8 -*- |
2 # -*- coding: utf-8 -*- |
3 |
3 |
4 # Copyright (c) 2016 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # Copyright (c) 2016 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
5 # |
5 # |
6 # This is the install script for the eric6 debug client. It may be used |
6 # This is the install script for the eric debug client. It may be used |
7 # to just install the debug clients for remote debugging. |
7 # to just install the debug clients for remote debugging. |
8 # |
8 # |
9 |
9 |
10 """ |
10 """ |
11 Installation script for the eric6 debug clients. |
11 Installation script for the eric debug clients. |
12 """ |
12 """ |
13 |
13 |
14 import io |
14 import io |
15 import sys |
15 import sys |
16 import os |
16 import os |
67 print(" {0} [-chz] [-d dir]".format(progName)) |
67 print(" {0} [-chz] [-d dir]".format(progName)) |
68 else: |
68 else: |
69 print(" {0} [-chz][-d dir] [-i dir]".format(progName)) |
69 print(" {0} [-chz][-d dir] [-i dir]".format(progName)) |
70 print("where:") |
70 print("where:") |
71 print(" -h, --help display this help message") |
71 print(" -h, --help display this help message") |
72 print(" -d dir where eric6 debug client files will be installed") |
72 print(" -d dir where eric debug client files will be installed") |
73 print(" (default: {0})".format(modDir)) |
73 print(" (default: {0})".format(modDir)) |
74 if not sys.platform.startswith("win"): |
74 if not sys.platform.startswith("win"): |
75 print(" -i dir temporary install prefix") |
75 print(" -i dir temporary install prefix") |
76 print(" (default: {0})".format(distDir)) |
76 print(" (default: {0})".format(distDir)) |
77 print(" -c don't cleanup old installation first") |
77 print(" -c don't cleanup old installation first") |
208 else: |
208 else: |
209 targetDir = os.path.join(modDir, installPackage) |
209 targetDir = os.path.join(modDir, installPackage) |
210 |
210 |
211 try: |
211 try: |
212 # Install the files |
212 # Install the files |
213 # copy the various parts of eric6 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(eric6SourceDir, "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=["eric6config.py*"]) |
239 # Parse the command line. |
239 # Parse the command line. |
240 global progName, modDir, doCleanup, doCompile, distDir |
240 global progName, modDir, doCleanup, doCompile, distDir |
241 global sourceDir |
241 global sourceDir |
242 |
242 |
243 if sys.version_info < (3, 6, 0) or sys.version_info >= (4, 0, 0): |
243 if sys.version_info < (3, 6, 0) or sys.version_info >= (4, 0, 0): |
244 print('Sorry, the eric6 debugger requires Python 3.6 or better' |
244 print('Sorry, the eric debugger requires Python 3.6 or better' |
245 ' for running.') |
245 ' for running.') |
246 exit(5) |
246 exit(5) |
247 |
247 |
248 progName = os.path.basename(argv[0]) |
248 progName = os.path.basename(argv[0]) |
249 |
249 |
316 os.path.join(eric6SourceDir, "DebugClients"), |
316 os.path.join(eric6SourceDir, "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 eric6 debug clients ...") |
321 print("\nInstalling eric debug clients ...") |
322 res = installEricDebugClients() |
322 res = installEricDebugClients() |
323 |
323 |
324 print("\nInstallation complete.") |
324 print("\nInstallation complete.") |
325 print() |
325 print() |
326 |
326 |