From: Mario B. <st...@gm...> - 2009-08-06 00:27:14
|
Hi Pablo, On Wed, Aug 5, 2009 at 11:11 AM, Pablo dAngelo<Pab...@we...> wrote: > Hi Mario, >> >> Yes, it does work with 2.4. You simply need to regenerate gv_pwrap.c. >> On my linux box, the following works (cd to src/lib/gv and do): >> python /usr/share/pygtk/2.0/codegen/codegen.py -o gv.override -r >> /usr/share/pygtk/2.0/defs/gtk-base-types.defs -p _gv gv.defs > >> gv_pwrap.c > > The above command worked on my CentOS 5.3 machine. After adding > > /* Backport type definitions from Python 2.5's object.h */ > #if PY_VERSION_HEX < 0x02050000 > typedef int Py_ssize_t; > typedef Py_ssize_t (*lenfunc)(PyObject *); > typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); > typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); > typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); > typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); > #endif /* PY_VERSION_HEX */ > > to the top of gv.override, and rerunning the code generation, > I could compile the the python extension. Okay, so you did need that also (I thought somehow it would have been taken care of by pygtk). I got something slightly cleaner (and more complete) from somewhere else though: #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN typedef inquiry lenfunc; typedef intargfunc ssizeargfunc; typedef intobjargproc ssizeobjargproc; typedef intintargfunc ssizessizeargfunc; typedef intintobjargproc ssizessizeobjargproc; typedef getreadbufferproc readbufferproc; typedef getwritebufferproc writebufferproc; typedef getsegcountproc segcountproc; typedef getcharbufferproc charbufferproc; #endif But I don't know where this really belongs... I guess at the top of gv.override is fine, unless someone else has a better idea. > However, I now get an error in setup.py. Any idea about that? <snip> > File "/usr/lib64/python2.4/posixpath.py", line 77, in split > i = p.rfind('/') + 1 > AttributeError: 'list' object has no attribute 'rfind' I never encountered this error... and I must admit I am not familiar enough with distutils to be able to diagnostic. Help anyone? > I fully understand that, as I'm in a similar situation (regarding the lack of time) with the open source project I started (hugin). > Fortunately there is a good community there now. You mean hugin the panorama stitching software? I used it last year for a personal project. Nice work on this! cheers -- Mario B. |