On Mon, 18 Dec 2000, Armin Steinhoff wrote:

> Hello James,
> 
> I'm just trying to extend 'Python 2.0 for QNX RTP' with pygtk.
> gtk+-1.2.8 and the glib-1.2.8 are available and pygtk compiles flawless in the 
>meantime.
> 
> The remaining stupid question is: how do I realize the pygtk extension
> (static) of Python 2.0 ??? 

To compile the pygtk extension statically into the main executable,
configure and build pygtk as normal.  Then grab the gtkmodule.c and the
two generated files gtkmodule_{defs,impl}.c, and put them in the Modules
directory of the python source dir.

Then add a line to the Setup file something like:
  _gtk gtkmodule.c `gtk-config --cflags --libs`

(you may have to actually put the output of gtk-config there
instead).  This should be enough to compile it statically.

You can probably guess what to do for the other modules if you need them.

Compiling python this way is also necessary if you want to freeze a pygtk
program to a single executable that doesn't require external libraries.

Note that if you do this and distribute the combined work, you will need
to provide some way for people to link with newer versions of pygtk, in
accordance with the LGPL.

James.


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to