- 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 ;-)
I had to use: jhbuild bootstrap --ignore-system because I kept getting the following:
ReplyDelete*** Error during phase configure of gtk+: ########## Error running autoreconf -fis && ./configure --prefix /Users/smu/gtk/inst --libdir '/Users/smu/gtk/inst/lib' --with-gdktarget=quartz --disable-static *** [10/18]
[1] Rerun phase configure
[2] Ignore error and continue to build
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "clean"
[8] Go to phase "distclean"
choice: