views:

628

answers:

3

I have read that it is possible to build GTK+ on MacOS X. I know that it's possible to create a bundle of a GTK+ application on MacOS. I also know that it's possible to create widgets that look sort of native. However, searching around I am not really clear on how to create a bundle that includes the native theme stuff, and uses Python rather than its own C main-point. There are also rumors that it's possible to build PyGTK, but it sounds like there might still be some wrinkles in that process.

However, there is no step-by-step guide that explains how one can set up an environment where an application might be run from Python source, then built and deployed in an app bundle. How can I go about doing that?

+1  A: 

I'm not sure if I'm grokking all the details of your question, but looking at your problem in general (how do I deploy a python app on mac), I'm inclined to say that the answer is py2app. Basically this will bundle a python interpreter and all relevant python files for you, and give you a scriptable system that you can use to add in whatever other resources/dependencies you need.

Ryan
That's definitely a part of the answer, but that doesn't help with getting the appropriate resources for a GTK engine into an app bundle somehow. I know that part of the answer is the "Mach-O dependencies" described on the page you linked to, but ... how do I specify them? Where do they go? How do I build them?
Glyph
+1  A: 

While it's not a guide solely targetted at python/GTK+/OS X, this post is a good, detailed description of someone else's attempt to do most of what you describe. Obviously, the app-specific stuff is going to vary.

Kai
That is a really good post, but unfortunately it trails off with running inside the jhbuild environment, which is several important steps away from an actual, finished application. I've gotten basically to the point at the end of that description, but I have no idea what to do next.
Glyph
+2  A: 

Native looking widgets is quite complicated. There's a beginning of quartz engine (for theming) found here http://git.gnome.org/browse/gtk+/tree/gdk/quartz For self-contained applications check out the newly released bundle on http://live.gnome.org/GTK%2B/OSX

Johan Dahlin
The stuff on gtk-osx.org was never particularly helpful, and now the site appears to be gone :(.
Glyph
I updated the links, thanks for mentioning.
Johan Dahlin