scripts/install-debugclients.py

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8918
2167e507b277
child 9221
bf71ee032bb4
diff -r 3fc8dfeb6ebe -r b99e7fd55fd3 scripts/install-debugclients.py
--- a/scripts/install-debugclients.py	Tue Jul 05 16:34:43 2022 +0200
+++ b/scripts/install-debugclients.py	Thu Jul 07 11:23:56 2022 +0200
@@ -30,7 +30,7 @@
 doCleanup = True
 doCompile = True
 sourceDir = "eric"
-eric7SourceDir = os.path.join(sourceDir, "eric7")
+eric7SourceDir = ""
 
 
 def exit(rcode=0):
@@ -162,7 +162,7 @@
     """
     Uninstall the old eric debug client files.
     """
-    global pyModDir
+    global pyModDir, installPackage
     
     try:
         # Cleanup the install directories
@@ -208,9 +208,9 @@
         # Install the files
         # copy the various parts of eric debug clients
         copyTree(
-            os.path.join(eric7SourceDir, "DebugClients"), targetDir,
+            os.path.join(eric7SourceDir, "DebugClients"),
+            targetDir,
             ['*.py', '*.pyc', '*.pyo', '*.pyw'],
-            [os.path.join(sourceDir, ".ropeproject")],
             excludePatterns=["eric7config.py*"])
         
         # copy the license file
@@ -234,7 +234,7 @@
 
     # Parse the command line.
     global progName, modDir, doCleanup, doCompile, distDir
-    global sourceDir
+    global sourceDir, eric7SourceDir
     
     if sys.version_info < (3, 7, 0) or sys.version_info >= (4, 0, 0):
         print('Sorry, the eric debugger requires Python 3.7 or better'
@@ -277,7 +277,12 @@
     installFromSource = not os.path.isdir(sourceDir)
     if installFromSource:
         sourceDir = os.path.abspath("..")
-        eric7SourceDir = os.path.join(sourceDir, "eric7")
+    
+    eric7SourceDir = (
+        os.path.join(sourceDir, "eric7")
+        if os.path.exists(os.path.join(sourceDir, "eric7")) else
+        os.path.join(sourceDir, "src", "eric7")
+    )
     
     # cleanup source if installing from source
     if installFromSource:

eric ide

mercurial