Commits

Anonymous committed 135a5f4

Fix issue with locating the stub executable when
using /usr/bin/python2.5

  • Participants
  • Parent commits 2c978b3

Comments (0)

Files changed (3)

 NEWS
 ====
 
+py2app 0.5.2
+------------
+
+py2app 0.5.1 is a bugfix release
+
+Bug fixes:
+
+- Ensure that the right stub executable gets found when using
+  the system python 2.5
+
 py2app 0.5.1
 ------------
 

py2app/apptemplate/setup.py

 import os
 import re
+import sys
 import distutils.sysconfig
 import distutils.util
 
                 os.stat(dest).st_mtime < os.stat(src).st_mtime):
             os.system('"%(CC)s" -arch i386 -arch ppc -o "%(dest)s" "%(src)s" %(CFLAGS)s' % locals())
 
+    arch = distutils.util.get_platform().split('-')[-1]
+
+    if sys.prefix.startswith('/System') and \
+            sys.version_info[:2] == (2,5):
+        arch = "fat"
+
     dest = os.path.join(
             builddir,
-            'main-' + distutils.util.get_platform().split('-')[-1]
+            'main-' + arch
     )
 
     return dest

py2app/bundletemplate/setup.py

 import os
 import re
+import sys
 import distutils.sysconfig
 import distutils.util
 
                 os.stat(dest).st_mtime < os.stat(src).st_mtime):
             os.system('"%(CC)s" -arch i386 -arch ppc -o "%(dest)s" "%(src)s" %(CFLAGS)s' % locals())
 
+    arch = distutils.util.get_platform().split('-')[-1]
+
+    if sys.prefix.startswith('/System') and \
+            sys.version_info[:2] == (2,5):
+        arch = "fat"
+
     dest = os.path.join(
         builddir,
-        'main-' + distutils.util.get_platform().split('-')[-1]
+        'main-' + arch
     )
 
     return dest