Extended the install script to improve cooperation with packagers. 5_5_x

Sun, 30 Nov 2014 11:57:30 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 30 Nov 2014 11:57:30 +0100
branch
5_5_x
changeset 3949
1ce546a04f0a
parent 3945
3bd92b662b7e
child 3951
aac0d9fd2bc2

Extended the install script to improve cooperation with packagers.

UI/Info.py file | annotate | diff | comparison | revisions
cleanupSource.py file | annotate | diff | comparison | revisions
compileUiFiles.py file | annotate | diff | comparison | revisions
install-i18n.py file | annotate | diff | comparison | revisions
install.py file | annotate | diff | comparison | revisions
uninstall.py file | annotate | diff | comparison | revisions
--- a/UI/Info.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/UI/Info.py	Sun Nov 30 11:57:30 2014 +0100
@@ -13,6 +13,6 @@
 Version = '@@VERSION@@ (rev. @@REVISION@@)'
 Copyright = 'Copyright (c) 2002 - 2014 Detlev Offenbach' \
             ' <detlev@die-offenbachs.de>'
-BugAddress = 'eric5-bugs@eric-ide.python-projects.org'
-FeatureAddress = 'eric5-featurerequest@eric-ide.python-projects.org'
+BugAddress = 'eric-bugs@eric-ide.python-projects.org'
+FeatureAddress = 'eric-featurerequest@eric-ide.python-projects.org'
 Homepage = "http://eric-ide.python-projects.org/index.html"
--- a/cleanupSource.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/cleanupSource.py	Sun Nov 30 11:57:30 2014 +0100
@@ -70,5 +70,5 @@
         print(
             "\nAn internal error occured.  Please report all the output of the"
             " program, \nincluding the following traceback, to"
-            " eric5-bugs@eric-ide.python-projects.org.\n")
+            " eric-bugs@eric-ide.python-projects.org.\n")
         raise
--- a/compileUiFiles.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/compileUiFiles.py	Sun Nov 30 11:57:30 2014 +0100
@@ -125,5 +125,5 @@
         print(
             "\nAn internal error occured.  Please report all the output of the"
             " program, \nincluding the following traceback, to"
-            " eric5-bugs@eric-ide.python-projects.org.\n")
+            " eric-bugs@eric-ide.python-projects.org.\n")
         raise
--- a/install-i18n.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/install-i18n.py	Sun Nov 30 11:57:30 2014 +0100
@@ -128,5 +128,5 @@
     except:
         print("""An internal error occured.  Please report all the output of"""
               """ the program,\nincluding the following traceback, to"""
-              """ eric5-bugs@eric-ide.python-projects.org.\n""")
+              """ eric-bugs@eric-ide.python-projects.org.\n""")
         raise
--- a/install.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/install.py	Sun Nov 30 11:57:30 2014 +0100
@@ -594,8 +594,8 @@
     try:
         # Install the files
         # make the install directories
-        for key in list(cfg.keys()):
-            if not os.path.isdir(cfg[key]):
+        for key in cfg.keys():
+            if cfg[key] and not os.path.isdir(cfg[key]):
                 os.makedirs(cfg[key])
         
         # copy the eric5 config file
@@ -889,7 +889,7 @@
     """
     Create the installation config dictionary.
     """
-    global modDir, platBinDir, cfg, apisDir
+    global modDir, platBinDir, cfg, apisDir, installApis
         
     ericdir = os.path.join(modDir, "eric5")
     cfg = {
@@ -908,10 +908,13 @@
         'bindir': platBinDir,
         'mdir': modDir,
     }
-    if apisDir:
-        cfg['apidir'] = apisDir
+    if installApis:
+        if apisDir:
+            cfg['apidir'] = apisDir
+        else:
+            cfg['apidir'] = os.path.join(ericdir, "api")
     else:
-        cfg['apidir'] = os.path.join(ericdir, "api")
+        cfg['apidir'] = ""
 configLength = 15
     
 
@@ -922,15 +925,16 @@
     global cfg, sourceDir, macAppBundlePath
     
     apis = []
-    for progLanguage in progLanguages:
-        for apiName in glob.glob(
-                os.path.join(sourceDir, "APIs", progLanguage, "*.api")):
-            apis.append(os.path.basename(apiName))
-        if progLanguage == "Python":
-            # treat Python3 API files the same as Python API files
+    if installApis:
+        for progLanguage in progLanguages:
             for apiName in glob.glob(
-                    os.path.join(sourceDir, "APIs", "Python3", "*.api")):
+                    os.path.join(sourceDir, "APIs", progLanguage, "*.api")):
                 apis.append(os.path.basename(apiName))
+            if progLanguage == "Python":
+                # treat Python3 API files the same as Python API files
+                for apiName in glob.glob(
+                        os.path.join(sourceDir, "APIs", "Python3", "*.api")):
+                    apis.append(os.path.basename(apiName))
     
     fn = 'eric5config.py'
     config = (
@@ -1419,5 +1423,5 @@
     except:
         print("""An internal error occured.  Please report all the output"""
               """ of the program,\nincluding the following traceback, to"""
-              """ eric5-bugs@eric-ide.python-projects.org.\n""")
+              """ eric-bugs@eric-ide.python-projects.org.\n""")
         raise
--- a/uninstall.py	Fri Nov 28 19:34:59 2014 +0100
+++ b/uninstall.py	Sun Nov 30 11:57:30 2014 +0100
@@ -178,15 +178,16 @@
         
         # Cleanup API files
         apidir = getConfig('apidir')
-        for progLanguage in progLanguages:
-            for name in getConfig('apis'):
-                apiname = os.path.join(apidir, progLanguage.lower(), name)
-                if os.path.exists(apiname):
-                    os.remove(apiname)
-            for apiname in glob.glob(
-                    os.path.join(apidir, progLanguage.lower(), "*.bas")):
-                if os.path.basename(apiname) != "eric5.bas":
-                    os.remove(apiname)
+        if apidir:
+            for progLanguage in progLanguages:
+                for name in getConfig('apis'):
+                    apiname = os.path.join(apidir, progLanguage.lower(), name)
+                    if os.path.exists(apiname):
+                        os.remove(apiname)
+                for apiname in glob.glob(
+                        os.path.join(apidir, progLanguage.lower(), "*.bas")):
+                    if os.path.basename(apiname) != "eric5.bas":
+                        os.remove(apiname)
         
         if sys.platform == "darwin":
             # delete the Mac app bundle
@@ -261,5 +262,5 @@
         print("""An internal error occured.  Please report all the output of"""
               """ the program,\n"""
               """including the following traceback, to"""
-              """ eric5-bugs@eric-ide.python-projects.org.\n""")
+              """ eric-bugs@eric-ide.python-projects.org.\n""")
         raise

eric ide

mercurial