[PyKDE] PyKDE-3.7-4 Release

Jim Bublitz jbublitz at nwinternet.com
Fri Aug 15 23:21:01 BST 2003


On Friday August 15 2003 11:25, Gordon Tyler wrote:
> I'm not sure if this is a bug but I had to modify the build.py
> to make it run on my installation. My installation is as
> follows:

No - it's a feature :) 

> python 2.2 installed into /usr (deb package), sip 3.7 and pyqt
> 3.7 installed into /usr/local.

build.py wasn't written to allow for that possibility, but maybe 
should be (somewhat)

> When I ran the PyKDE build.py I got the following error:

> ldd: /usr/lib/python2.2/site-packages/libqtcmodule.so: No such
> file or directory
> Can't determine if PyQt uses libqt-mt
> **************************************************************
>**************** Error: PyQt linked to Qt lib which is
> incompatible with KDE version (threading)
> -- from line 664 in build.py
> **************************************************************
>****************

build.py runs ldd to find out which Qt lib PyQt was linked with 
(libqt or libqt-mt). The way it runs ldd is to expect to find 
libqtcmodule.so in site-packages/ but didn't in this case. There 
should be a separate test for locating libqtcmodule.so so that 
the diagnostic can be written more clearly. 

> It was looking for the PyQt modules in the python 2.2 standard
> site-packages directory instead of the /usr/local location
> which I had specified with the -d option to the PyKDE
> build.py. So I changed the PyKDE build.py on line 658, to use
> modDir instead of platPySiteDir and that seemed to work.

-d on build.py allows a different output directory for PyKDE 
modules (mostly as a convenience to packagers), but wasn't 
intended to allow a different location for PyQt modules. It 
works in this case because you write PyKDE to the same directory 
as PyQt.

> This changes the assumption that PyQt is installed in the
> standard python site-packages directory, into the assumption
> that PyQt is installed in the location where you are going to
> install PyKDE. IMHO, that is a better assumption to make
> unless you want to add another option for the location of the
> PyQt modules.

I'd go as far as searching sys.path for libqtcmodule.so - it 
appears that would succeed in your case. Beyond that, it 
complicates the build.py code too much in my opinion, and worse, 
makes it much harder to troubleshoot install problems (newbies).  
That would allow ldd to work and also allow the correct -L args 
to be passed to the make files. 

I don't think the assumption that someone using -d will have the 
PyQt libs in the same place the PyKDE libs are going is always 
going to hold. In the case of packagers it will probably never 
be true.

Would that work in your situation? Where do you have libsip 
installed?

Jim




More information about the PyQt mailing list