[pygtk] PyGTK with py2app

Antoine Martin antoine at nagafix.co.uk
Sun Oct 16 14:03:54 WST 2011

>>> Now, I have a proper PyGTK app that runs perfectly fine. I need a way to
>> bundle it properly.
>> You might want to look at: http://live.gnome.org/GTK%2B/OSX/Bundling ?
>> That is the official way to build and bundle PyGTK and Python on OS X.
> I did check out GTK-OSX. But, they don't seem to have much documentation for
> PyGTK. And, I'm not very familiar with what happens when an App bundle is to
> be built.
(Py)GTK relies on a number of environment variables for locating
resources and also for loading the native libraries. You can find an
examples script here:
Note: this is meant to be used in a bundled app, if you are using it
from your development tree you will probably need to tweak it.

> I even followed Winswitch's instructions at
> http://winswitch.org/dev/macosx.html. But I'm stuck after the "jhbuild
> build" step. I just went ahead and executed my application from inside the
> jhbuild shell. I got a huge list of errors: http://pastebin.com/78AMZ3Tg - I
> couldn't make head or tail of it.
You should post this error with the full details (env, steps, etc) to
the gtk-osx mailing list.
OTOH it may be a path/library conflict issue where you end up using a
mix of gtk-osx build and /opt/gtk.

> Should I install gtk-osx after removing /opt/gtk? It would be great if
> someone could come up with a PyGTK-specific guide for building and bundling
> apps using GTK-OSX.
Having an existing installation of gtk in /opt or somewhere else (ie:
macports) should not make any difference as long as the paths are setup


> Thanks,
> Shrihari
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/

More information about the pygtk mailing list