Static linking of python and pyqt

Diez B. Roggisch deets at nospam.web.de
Wed Dec 19 08:32:42 EST 2007


Markus Dahlbokum wrote:

>> > I just want the qt libs linked to the interpreter without accessing
>> > them by a module. I tried the configure option '--with-libs='lib ...''.
>> > The make did fine but the executable is too small and the qt symbols
>> > are not known by it. How can I just link qt statically?
>>
>> Why do you want to do this? If qt isn't actually *used* in Python (as
>> you don't include the pyqt modules), what effect do you expect from
>> such linking?
>>
>> I think it linked just fine - it just didn't include any symbols,
>> because none were needed. That is the correct, expected behavior.
>> It all worked fine.
>>
>> Regards,
>> Martin
> 
> I need an environment that can be delivered to our customers without
> installing python, qt and pyqt. We want to provide the complete package.
> In order to do so I need to link at least python and qt. How can this be
> done?
> 
> Of course a complete package with python, qt and pyqt would be the best
> solution but there seem to be even more complications that way. If you can
> help me with this I would be very grateful.

I don't think you will succeed in that attempt. Statically linking means
statically refering, as martin says. I'm not an expert, but as qt refers to
PyQt (via sip-bindings) but the latter one isn't explicitly refered to by
the python-interpreter itself, you won't get the linking right.

I've got the agfeo Tk-suite client running on my system - it's a windows +
linux qt-based app. And it ships completely with a version of qt, locally
installed into it's program-dir. An approach that is even more common in
OSX and Windows. So you might consider using that instead.

Diez



More information about the Python-list mailing list