[PyKDE] KDE 3.1.3 + Python 2.3 + PyKDE 3.7-4

Jim Bublitz jbublitz at nwinternet.com
Sat Oct 18 01:10:01 BST 2003


On Friday October 17 2003 14:48, Simon Edwards wrote:
> Hi,
>
> I'm trying to compile a working PyKDE on my new Mandrake
> 9.2-mobile, but I'm having trouble. Is this config known to
> work with PyQt 3.7 and PyKDE 3.7-4?
>
> KDE 3.1.3
> Python 2.3
>
> I'm seeing:
>
> sip/kzip.sip: In function `PyObject*
> sipConvertFrom_ulonglong(ulonglong*)': sip/kzip.sip:153:
> error: `LONG_LONG' undeclared (first use this function)
> sip/kzip.sip:153: error: (Each undeclared identifier is
> reported only once for each function it appears in.)
> sip/kzip.sip:153: error: syntax error before `)' token
> sip/kzip.sip: In function `PyObject*
> sipConvertFrom_longlong(longlong*)': sip/kzip.sip:115: error:
> syntax error before `)' token make[1]: *** [kiohuge0.o] Error
> 1
>
> or should I just wait for 3.8?

Easy fix:

In kzip.sip, find the two typedefs shown below (near the end in 
the %MappedTypes) and add the #defines shown (yes - same one in 
both places)

typedef long long longlong;
#define LONG_LONG  PY_LONG_LONG

typedef unsigned long long ulonglong;
#define LONG_LONG  PY_LONG_LONG

It's a change in Python 2.3. If you still want the sip file to 
work with Python < 2.3 you can warp the #defnes with:

#if PY_MAJOR_VERSION >= 2 && PY_MINOR_VERSION >= 3
    #define LONG_LONG PY_LONG_LONG
#endif

which is OK until Python 3.0 is released.

For older versions of KDE (< 3.1.0), you need to make the changes 
in global.sip instead. Same change though.

Jim




More information about the PyQt mailing list