[PyQt] Building PyQt5 for embedded Linux systems

Phil Thompson phil at riverbankcomputing.com
Fri Jul 24 17:20:23 BST 2015


On 24/07/2015 5:00 pm, David Boddie wrote:
> On Fri Jul 24 16:13:43 BST 2015, Phil Thompson wrote:
> 
>> On 24/07/2015 3:33 pm, David Boddie wrote:
> 
>> > I imagine that using pyqtdeploy is the preferred way to do this these
>> > days.
>> > Is that correct?
>> 
>> No.
> 
> OK, that's useful to know, if a bit surprising. I'll explain why below.
> 
>> > Can anyone share their experiences with this kind of embedded
>> > development using PyQt?
>> 
>> The traditional problem with embedded systems, as you know, is whether
>> it uses a stripped down version of Qt. If it is a full version, but
>> without the X11 specific calls, then it would be easy enough to define 
>> a
>> new SIP feature to disable those when necessary.
> 
> I see that I conflated three issues: cross-compiling, X support and
> features.
> 
> My understanding was that, if you had the toolchain and a set of full
> Qt X11 libraries for the target, then you could use pyqtdeploy to build
> PyQt for the target. This is the cross-compilation issue which I assume
> is solved. Would you use pyqtdeploy for cross-compiling to other
> architectures running Qt on X11?

pyqtdeploy has nothing to do with it. It's job is to turn a Python 
application into C++ code, bytecode packaged as a Qt resource, and a 
.pro file.

qmake takes care of any cross-compilation.

> Non-X11 builds are probably simple enough to add support for.
> 
> I'm not tracking the evolution of the PyQt configure script these days,
> but I don't think there's a nice way to handle feature-reduced builds
> without either a lot of work to patch generated sip files or better
> support in whatever generates those files.

You can supply configure.py with a configuration file containing the 
settings it would otherwise find by introspecting the host system. 
pyqtdeploy will give you a configuration file for any supported target - 
but you shouldn't really take it at face value in case it doesn't match 
your particular target.

As you say, the real problem is supporting all the additional features 
in the .sip files. I have enough trouble getting the SSL feature correct 
as it is.

Phil


More information about the PyQt mailing list