Commits

Anonymous committed c566526

Two small bugfixes

Comments (0)

Files changed (3)

+py2app 0.4.4
+------------
+
+py2app 0.4.4 is a ...
+
+Features:
+-
+
+Bug fixes:
+- Try both 'import Image' and 'from PIL import Image' in the PIL
+  recipe.
+  (Patch contributed by Christopher Barker)
+- Fix for broken alias builds on MacOSX 10.6 (Snow Leopard)
+  (Patch contributed by Jamer R Eagan)
+
 py2app 0.4.3
 ------------
 

py2app/build_app.py

 
         # symlink python executable
         execdst = os.path.join(appdir, 'Contents', 'MacOS', 'python')
-        self.symlink(sys.executable, execdst)
+        prefixPathExecutable = os.path.join(sys.prefix, 'bin', 'python')
+        if os.path.exists(prefixPathExecutable):
+            pyExecutable = prefixPathExecutable
+        else:
+            pyExecutable = sys.executable
+        self.symlink(pyExecutable, execdst)
 
         # make PYTHONHOME
         pyhome = os.path.join(resdir, 'lib', 'python' + sys.version[:3])

py2app/recipes/PIL/prescript.py

 def _recipes_pil_prescript(plugins):
-    import Image
+    try:
+        import Image
+    except ImportError:
+        from PIL import Image
+
     import sys
     def init():
         if Image._initialized >= 2: