160 |
160 |
161 def cleanUp(): |
161 def cleanUp(): |
162 """ |
162 """ |
163 Uninstall the old eric debug client files. |
163 Uninstall the old eric debug client files. |
164 """ |
164 """ |
165 global pyModDir |
165 global pyModDir, installPackage |
166 |
166 |
167 try: |
167 try: |
168 # Cleanup the install directories |
168 # Cleanup the install directories |
169 dirname = os.path.join(pyModDir, installPackage) |
169 dirname = os.path.join(pyModDir, installPackage) |
170 if os.path.exists(dirname): |
170 if os.path.exists(dirname): |
206 |
206 |
207 try: |
207 try: |
208 # Install the files |
208 # Install the files |
209 # copy the various parts of eric debug clients |
209 # copy the various parts of eric debug clients |
210 copyTree( |
210 copyTree( |
211 os.path.join(eric7SourceDir, "DebugClients"), targetDir, |
211 os.path.join(eric7SourceDir, "DebugClients"), |
|
212 targetDir, |
212 ['*.py', '*.pyc', '*.pyo', '*.pyw'], |
213 ['*.py', '*.pyc', '*.pyo', '*.pyw'], |
213 [os.path.join(sourceDir, ".ropeproject")], |
|
214 excludePatterns=["eric7config.py*"]) |
214 excludePatterns=["eric7config.py*"]) |
215 |
215 |
216 # copy the license file |
216 # copy the license file |
217 shutilCopy(os.path.join(sourceDir, "docs", "LICENSE.GPL3"), targetDir) |
217 shutilCopy(os.path.join(sourceDir, "docs", "LICENSE.GPL3"), targetDir) |
218 |
218 |
232 """ |
232 """ |
233 import getopt |
233 import getopt |
234 |
234 |
235 # Parse the command line. |
235 # Parse the command line. |
236 global progName, modDir, doCleanup, doCompile, distDir |
236 global progName, modDir, doCleanup, doCompile, distDir |
237 global sourceDir |
237 global sourceDir, eric7SourceDir |
238 |
238 |
239 if sys.version_info < (3, 7, 0) or sys.version_info >= (4, 0, 0): |
239 if sys.version_info < (3, 7, 0) or sys.version_info >= (4, 0, 0): |
240 print('Sorry, the eric debugger requires Python 3.7 or better' |
240 print('Sorry, the eric debugger requires Python 3.7 or better' |
241 ' for running.') |
241 ' for running.') |
242 exit(5) |
242 exit(5) |
275 doCompile = False |
275 doCompile = False |
276 |
276 |
277 installFromSource = not os.path.isdir(sourceDir) |
277 installFromSource = not os.path.isdir(sourceDir) |
278 if installFromSource: |
278 if installFromSource: |
279 sourceDir = os.path.abspath("..") |
279 sourceDir = os.path.abspath("..") |
280 eric7SourceDir = os.path.join(sourceDir, "eric7") |
280 |
|
281 eric7SourceDir = ( |
|
282 os.path.join(sourceDir, "eric7") |
|
283 if os.path.exists(os.path.join(sourceDir, "eric7")) else |
|
284 os.path.join(sourceDir, "src", "eric7") |
|
285 ) |
281 |
286 |
282 # cleanup source if installing from source |
287 # cleanup source if installing from source |
283 if installFromSource: |
288 if installFromSource: |
284 print("Cleaning up source ...") |
289 print("Cleaning up source ...") |
285 cleanupSource(os.path.join(eric7SourceDir, "DebugClients")) |
290 cleanupSource(os.path.join(eric7SourceDir, "DebugClients")) |