install.py

changeset 3948
6c3720179d6b
parent 3943
37d88bed7bb9
child 3950
6819272cafd5
--- a/install.py	Sat Nov 29 16:31:36 2014 +0100
+++ b/install.py	Sun Nov 30 11:55:32 2014 +0100
@@ -625,8 +625,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 eric6 config file
@@ -911,7 +911,7 @@
     """
     Create the installation config dictionary.
     """
-    global modDir, platBinDir, cfg, apisDir
+    global modDir, platBinDir, cfg, apisDir, installApis
         
     ericdir = os.path.join(modDir, "eric6")
     cfg = {
@@ -930,10 +930,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
     
 
@@ -944,15 +947,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 = 'eric6config.py'
     config = (

eric ide

mercurial