[Pythonmac-SIG] OS X 10.7 Lion, py2app 0.6.3, argv-emulation, wxPython

Florian Höch lists at hoech.net
Sun Jul 31 00:39:58 CEST 2011


In 10.7, some functionality of the Carbon libraries is only available in 
32-bit mode, but py2app created binaries run in 64-bit mode on Lion. In 
my case wx and py2app's argv-emulation feature needed Carbon 
functionality that isn't available in 64-bit mode, so I did work around 
this by replacing the binaries with 32-bit ones after the app was created.

First, I used the official python.org Python 2.7 x86-64/i386 installer.
Then I built my app with the 32-bit python:

python2.7-32 setup.py p2app

Then I replaced the binaries in the app:

cp 
/Library/Python/2.7/site-packages/py2app-0.6.3-py2.7.egg/py2app/apptemplate/prebuilt/main-i386 
/PATH/TO/APP/APPNAME.app/Contents/MacOS/APPNAME

cp /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32 
/PATH/TO/APP/APPNAME.app/Contents/MacOS/python

Just thought I'd share my findings.

Regards
-- 
Florian Höch



More information about the Pythonmac-SIG mailing list