- Create a new user account (to make sure that no MacPorts/Fink/other libraries are available in the environment)
- Install git (http://code.google.com/p/git-osx-installer/downloads/list?can=3)
- Log in to the new account (I ssh'ed in from a Terminal)
- Download the build script (https://github.com/jralls/gtk-osx-build/raw/master/gtk-osx-build-setup.sh)
- Add ~/.local/bin to PATH
- Edit ~/.jhbuildrc-custom setting setup_sdk like so: setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"])
- Run these build commands:
- $ jhbuild bootstrap
- $ jhbuild build meta-gtk-osx-bootstrap
- $ jhbuild build meta-gtk-osx-core
- $ jhbuild build pygtk
- Download the PyGTK hello world script (http://www.pygtk.org/pygtk2tutorial/examples/helloworld.py)
- Update your PYTHONPATH: export export PYTHONPATH=$PYTHONPATH:~/gtk/inst/lib/python2.6/site-packages
- Make sure that 32-bit Python is used: export VERSIONER_PYTHON_PREFER_32_BIT=yes
- Test your build by running the hello world script: python helloworld.py
Note that to perform the last step you need to be properly logged in (not just through SSH).
I hope that this helps some of the people that have asked me about PyGTK builds. Happy hacking ;-)