Improved the Mac app bundle creation function. 6_1_x

Sun, 03 Apr 2016 12:29:37 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 03 Apr 2016 12:29:37 +0200
branch
6_1_x
changeset 4912
d20551adffb1
parent 4899
eed4eba94fe9
child 4927
8bd5f4ac55dc
child 4935
243867c2b810

Improved the Mac app bundle creation function.
(grafted from 652cb0520e9a55fa6fa64cbed9a01653c92f2f2c)

install.py file | annotate | diff | comparison | revisions
diff -r eed4eba94fe9 -r d20551adffb1 install.py
--- a/install.py	Mon Mar 28 13:33:05 2016 +0200
+++ b/install.py	Sun Apr 03 12:29:37 2016 +0200
@@ -899,10 +899,13 @@
     if path:
         pybin = os.path.join(sys.exec_prefix, "bin")
         pathlist = path.split(os.pathsep)
-        if pybin not in pathlist:
-            pathLine = "PATH={0}{1}{2}\n".format(pybin, os.pathsep, path)
-        else:
-            pathLine = "PATH={0}\n".format(path)
+        pathlist_n = [pybin]
+        for path_ in pathlist:
+            if path_ and path_ not in pathlist_n:
+                pathlist_n.append(path_)
+        pathLine = "PATH={0}\n".format(os.pathsep.join(pathlist_n))
+    
+    # create the wrapper script
     wrapper = ('''#!/bin/sh\n'''
                '''\n'''
                '''{0}'''

eric ide

mercurial