install.py

changeset 3697
c947a7eaace4
parent 3693
983904b9568f
child 3705
a88eb398a4ed
--- a/install.py	Sun Jul 06 14:44:46 2014 +0200
+++ b/install.py	Sun Jul 13 14:34:44 2014 +0200
@@ -468,7 +468,8 @@
                         os.remove(apiname)
                 for apiname in glob.glob(
                         os.path.join(apidir, progLanguage.lower(), "*.bas")):
-                    os.remove(apiname)
+                    if os.path.basename(apiname) != "eric5.bas":
+                        os.remove(apiname)
         except AttributeError:
             pass
         
@@ -664,10 +665,13 @@
                     print("Could not install '{0}'.".format(apiName))
             for apiName in glob.glob(os.path.join(sourceDir, "APIs",
                                                   "Python3", "*.bas")):
-                try:
-                    shutilCopy(apiName, apidir)
-                except EnvironmentError:
-                    print("Could not install '{0}'.".format(apiName))
+                if os.path.exists(os.path.join(
+                    apidir, os.path.basename(
+                        apiName.replace(".bas", ".api")))):
+                    try:
+                        shutilCopy(apiName, apidir)
+                    except EnvironmentError:
+                        print("Could not install '{0}'.".format(apiName))
     
     # create menu entry for Linux systems
     if sys.platform.startswith("linux"):

eric ide

mercurial