8190:fb0ef164f536 | 8273:698ae46f40a4 |
---|---|
16 import os | 16 import os |
17 import re | 17 import re |
18 import compileall | 18 import compileall |
19 import shutil | 19 import shutil |
20 import fnmatch | 20 import fnmatch |
21 import contextlib | |
21 | 22 |
22 # Define the globals. | 23 # Define the globals. |
23 progName = None | 24 progName = None |
24 currDir = os.getcwd() | 25 currDir = os.getcwd() |
25 modDir = None | 26 modDir = None |
39 @param rcode result code to report back (integer) | 40 @param rcode result code to report back (integer) |
40 """ | 41 """ |
41 global currDir | 42 global currDir |
42 | 43 |
43 if sys.platform.startswith("win"): | 44 if sys.platform.startswith("win"): |
44 try: | 45 with contextlib.suppress(): |
45 input("Press enter to continue...") # secok | 46 input("Press enter to continue...") # secok |
46 except (EOFError, SyntaxError): | |
47 pass | |
48 | 47 |
49 os.chdir(currDir) | 48 os.chdir(currDir) |
50 | 49 |
51 sys.exit(rcode) | 50 sys.exit(rcode) |
52 | 51 |
201 @return result code (integer) | 200 @return result code (integer) |
202 """ | 201 """ |
203 global distDir, doCleanup, sourceDir, modDir | 202 global distDir, doCleanup, sourceDir, modDir |
204 | 203 |
205 # set install prefix, if not None | 204 # set install prefix, if not None |
206 if distDir: | 205 targetDir = ( |
207 targetDir = os.path.normpath(os.path.join(distDir, installPackage)) | 206 os.path.normpath(os.path.join(distDir, installPackage)) |
208 else: | 207 if distDir else |
209 targetDir = os.path.join(modDir, installPackage) | 208 os.path.join(modDir, installPackage) |
209 ) | |
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( |