[PyKDE] Building PyQt as 1 shared library

Peter Kropf pkropf at legato.com
Thu Nov 6 18:04:00 GMT 2003


To start, merging qttable into qt was fairly easy. I modified qtmod.sip,
adding %Include qtable.sip. Then rebuilding PyQt resulted in the qtable code
being included and accessable from python. Instead of:

    from qttable import QTable 

the python code now reads:

    from qt import QTable

As to why I want to do this, it has to do with deployment issues on Solaris.
(See my posting from yesterday titled "qttable and installer confusion on
windows and solaris" for details.) We're using Gordon McMillan's Installer
(which is a great tool) to create executables for distribution. All is well
when running in the development environment (Windows and Solaris) and in the
Windows distribution. But on Solaris we have runtime issues. I've been able
to trace the problem back to the fact that qt and qtable are two seperate
shared libraries. Why that matters, I don't know yet and it's very
frustrating. However by building qtable into the qt shared library, I'm able
to create a distribution package on Solaris that works.

- Peter


> -----Original Message-----
> From: Phil Thompson [mailto:phil at riverbankcomputing.co.uk] 
> Sent: Thursday, November 06, 2003 12:52 AM
> To: Peter Kropf; pykde at mats.imk.fraunhofer.de
> Subject: Re: [PyKDE] Building PyQt as 1 shared library
> 
> 
> On Wednesday 05 November 2003 10:57 pm, Peter Kropf wrote:
> > Does anyone know if it's possible to build PyQt so that 
> there is one 
> > shared library that contains all the code instead of the 8 
> > (libqtcanvascmodule.so, libqtcmodule.so, libqtextcmodule.so, 
> > libqtnetworkcmodule.so, libqtsqlcmodule.so, libqttablecmodule.so, 
> > libqtuicmodule.so,
> > libqtxmlcmodule.so) as there are today?
> 
> Building it as a single shared library shouldn't be too 
> difficult. The problem 
> is that I'm not sure Python can deal with several modules 
> being defined in a 
> single library as it uses the module name to load the 
> extension and to call 
> the initialisation function.
> 
> Why would you want to do this?
> 
> Phil
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031106/5727d0a9/attachment.html


More information about the PyQt mailing list