[Gtk-osx-users] Custom python in a PyGTK bundle
Status: Beta
Brought to you by:
jralls
From: Dwayne B. <dw...@tr...> - 2011-05-19 11:36:50
|
Hi, I've had some problems packaging a PyGTK application. I've found solutions to most things but wanted to run them buy people on the list for some more experienced opinions. I followed the Gramps build instructions and built a custom Python (I'm on Snow Leapard and want the build to also work for Leopard) * I used the gramps launcher, this ended up not working as python was still looking for modules in ~/gtk/inst.... when I ran python -v $myapp * I then used the pygtk-demo launcher and that has worked better since it includes PYTHONPATH settings * But that was still not enough. I had to set PYTHONHOME to the Content/Resources for the bundle to actually run properly. This made the bundle run on other machines for the first time. Why has nobody else had to set PYTHONHOME? * Earlier on I noticed that I needed to package config/Makefile and later also include/python2.7/*.h (I hope those paths are correct enough for you to understand). Seems on 10.5 I needed those, I assume to build the .pyc. But it is odd that nobody else packages them! * In my adventure I noticed that my python executable still has two references to ~/gtk/inst - not sure if these caused my pain above though or if they even need changing. So with PYTHONPATH, PYTHONHOME and bundling some .h and Makefile I seem to have solved this. But it bothers me that this wasn't needed in Gramps builds or in any other PyGTK bundling description that I've seen. So your thoughts are appreciated. -- regards Dwayne |