[PyKDE] Sip Backward Compatibility

Yannick Gingras ygingras at eclipsys.qc.ca
Tue Nov 19 18:28:01 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi, 
	I had 30 C++ class wraped in python with sip 3.2 on Mandrake 8.2.  They were 
working perfectly.  I recently upgraded to Mandrake 9.0 and to sip 3.4.  My 
PyQt applications work perfectly but I have a weird problem with the self 
wrapped classes.

I don't have a libModuleNamec.so lib generated anymore, only a 
libModuleNamecmodule.so.

I use automake and since I don't fully undersand the Makefile macros, I suspec 
that I may have made a mistake in my sip-generated Makefile.am .

My entry point interface file look like this : 
%Module pyPeriph

%Include typedefs.sip
%Include defines.sip
%Include EclDebugHandleWrapper.sip
%Include CArgent.sip
%Include CMoneySeq.sip
%Include BinaryString.sip
%Include CStringSeq.sip
%Include CStringMap.sip

[...]

%Makefile Makefile.am .o

INCLUDES =   $$(all_includes) \
             -I../../include \
             -I../gc

PYTHONINTERP = /usr/bin/python

PYPERIPH_SRC = \
        $S \
        $m.py


datadir = /usr/Project
data_DATA = $m.py

sip$mDecl$m.h: sip$mVersion.h


sip$mVersion.h:
        touch sip$mVersion.h ;


$mcmodule.cpp: sip$mDecl$m.h


CLEANFILES = \
        $m.pyc

lib_LTLIBRARIES = lib$mcmodule.la
lib$mcmodule_la_SOURCES = $$(PYPERIPH_SRC)
lib$mcmodule_la_LIBADD = -L/usr/lib/python2.2/site-packages \
                         -lsip \
                          ../periph/libperiph.la \
                         ../impression/libimpression.la

Sip command line invocation and wrapper compilation gives no warning.  After 
installation, if I try to import the module from the directory where I 
installed them, I got the following error :
cd /usr/Project
python -c "import pyPeriph"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/Laniel/pyPeriph.py", line 6, in ?
    import libpyPeriphc
ImportError: No module named libpyPeriphc

And its right, I dont see such a module, either in the installation directory 
nor in the directory where I compiled the wrapper.

I read the Wilken Boie's documentation but the Makefile part of it does not 
enlight me on the possible cause of the problem.  Anyone know where I could 
find more information on the Makefile generation ?  Is is possible to use 
distutils to build the sip-generated wrappers ?

Thanks for the time you give to my inquiry.

- -- 
Yannick Gingras
Network Programer
ESC:wq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE92nRrfgINRJc6tXsRAjeKAJ4rPs8EneDsQuV8ylh9ocYO8PsSaACgjEN4
m4sS+Gh/nxRY+WGaI8RubMk=
=Ta5N
-----END PGP SIGNATURE-----




More information about the PyQt mailing list