Pyqtdeploy plan for the end of qmake?

Phil Thompson phil at riverbankcomputing.com
Wed Jul 8 09:47:37 BST 2020


On 07/07/2020 23:09, Patrick Stinson wrote:
> I have an app which has both python code and a sip-based Python
> extension to allow to app’s python code to access C apis. The sip
> extension contains classes that extend Qt classes via the .sip files
> provided by PyQt.
> 
> At current anyone who is developing such a sip extension has to build
> the entire Qt/Python/sip/PyQt stack from source. This has always been
> and still is horribly cumbersome when developing on more than one
> platform. For all the time I put into this project, I spend most of my
> time trying to keep my development environment alive across platforms
> because of the fragility of configuring and building the stack. It is
> such a pain that I will venture to predict that almost no one is doing
> this seriously on both macOS and windows, if on windows at all. If I
> am right, then that is a shame.
> 
> Broadly speaking, I believe this problem is important enough to point
> it out. I Am hijacking this email thread on the future of qt and
> dropping qmake in favor of cmake to point out this problem and ask for
> your thoughts.

pyqtdeploy was developed for two reasons...

- to produce applications implemented as a single executable (required 
by some platforms)
- to be able to produce those applications using cross-compilation

To achieve the above you have to build PyQt from source. If your target 
is a desktop platform then you will also need to build Qt from source. 
However if you don't want to achieve the above, ie. you are happy to 
build your application linked against Qt shared libraries and produce a 
package containing your application and those shared libraries in a form 
that is easily distributed. But if that's the case, why choose to use 
pyqtdeploy rather than one of the other tools available?

In other words, in normal circumstances, you choose to use pyqtdeploy 
because you *need* to build PyQt etc from source. If you don't *need* 
to, use something else.

Building from source, particularly Qt, is difficult. I certainly 
wouldn't update my sysroot every time I rebuilt my application. As a 
rule of thumb I would re-build my sysroot (with appropriate versions at 
the time) once a year. Assuming a typical agile timetable I would 
rebuild my application every couple of weeks. Even if you have to update 
your sysroot more often (because of a changing dependency) then stick 
with the same version of Qt etc.

Regarding cmake replacing qmake, I don't see that it makes things better 
or worse - just different. The change is primarily a cost saving 
exercise.

Phil


More information about the PyQt mailing list