This post is for teh Google and all poor souls trying to use py2app on Mountain Lion.
To make it short, the latest official release of py2app does not work with ML and Python 3.2, you have to get the current development snapshot. Unfortunately, py2app requires a number of smaller libraries written by his developer, Ronald Oussoren, and most of them have to be upgraded as well (and before you curse his name: he's single-handedly maintaining py2app, pyObjC and virtualenv-mac; what have you done recently for the community?).
So here's my recipe:
- Clone all required repos.
Oussoren uses Bitbucket, which is better accessed through Mercurial (hg); you can get hg from your favourite package manager (Homebrew/MacPorts/Fink/whatever).
hg clone https://bitbucket.org/ronaldoussoren/altgraph hg clone https://bitbucket.org/ronaldoussoren/macholib hg clone https://bitbucket.org/ronaldoussoren/py2app
- Install the packages. Since you're basically tracking trunk, you should probably use the
cd altgraph && python setup.py develop && cd .. cd macholib && python setup.py develop && cd .. cd py2app && python setup.py develop && cd ..Note that this means you'll have to keep these "source" folders available forever. If you don't like that, you should create an egg (e.g.
python setup.py bdist_egg), then install it (
For the record, altgraph will present itself as version 0.10, macholib as 0.7, and py2app as 1.5.
- Now you should be able to run your
python setup.py py2app
Bonus achievement: if you're using PyQt, this version of py2app will give you Retina-ready packages, by automatically adding the NSPrincipalClass key to the generated Info.plist and setting it to NSApplication. Nice one, Roland!