Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I develop and create a self-contained PyGTK application bundle for MacOS, with native-looking widgets?

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?

like image 627
Glyph Avatar asked Sep 22 '08 23:09

Glyph


3 Answers

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

like image 88
Johan Dahlin Avatar answered Oct 23 '22 11:10

Johan Dahlin


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.

like image 37
Ryan Avatar answered Oct 23 '22 09:10

Ryan


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.

like image 1
Kai Avatar answered Oct 23 '22 10:10

Kai