[Python-checkins] r80653 - python/trunk/Mac/BuildScript/build-installer.py

ronald.oussoren python-checkins at python.org
Fri Apr 30 16:58:39 CEST 2010


Author: ronald.oussoren
Date: Fri Apr 30 16:58:39 2010
New Revision: 80653

Log:
Fix for issue 8476


Modified:
   python/trunk/Mac/BuildScript/build-installer.py

Modified: python/trunk/Mac/BuildScript/build-installer.py
==============================================================================
--- python/trunk/Mac/BuildScript/build-installer.py	(original)
+++ python/trunk/Mac/BuildScript/build-installer.py	Fri Apr 30 16:58:39 2010
@@ -1099,13 +1099,14 @@
     Set the custom icon for the specified file or directory.
     """
 
-    toolPath = os.path.join(os.path.dirname(__file__), "seticon.app/Contents/MacOS/seticon")
-    dirPath = os.path.dirname(__file__)
+    dirPath = os.path.normpath(os.path.dirname(__file__))
+    toolPath = os.path.join(dirPath, "seticon.app/Contents/MacOS/seticon")
     if not os.path.exists(toolPath) or os.stat(toolPath).st_mtime < os.stat(dirPath + '/seticon.m').st_mtime:
         # NOTE: The tool is created inside an .app bundle, otherwise it won't work due
         # to connections to the window server.
-        if not os.path.exists('seticon.app/Contents/MacOS'):
-            os.makedirs('seticon.app/Contents/MacOS')
+        appPath = os.path.join(dirPath, "seticon.app/Contents/MacOS")
+        if not os.path.exists(appPath):
+            os.makedirs(appPath)
         runCommand("cc -o %s %s/seticon.m -framework Cocoa"%(
             shellQuote(toolPath), shellQuote(dirPath)))
 


More information about the Python-checkins mailing list