[PyQt] How to compile with PyQt5?

Phil Thompson phil at riverbankcomputing.com
Fri Jul 25 09:47:26 BST 2014


On 25/07/2014 4:36 am, Kovid Goyal wrote:
> 1600 lines? That's crazy. Here's an extract from calibre's build 
> system.

To add some perspective to this, the amount of code you have to actually 
write for a more representative extension module than QScintilla (eg. 
QtDataVisualization) is 80 lines. For that you get a configure.py with a 
consistent user interface with other PyQt based extension modules, 
support for cross-compiling to iOS, Android etc etc.

I might consider moving the boilerplate to a "pyqtbuilder" module where 
you would implement a class representing those 80 lines and pass it to a 
Builder class imported from the module. However that would mean
that, if you were supporting PyQt4 and PyQt5, you would have to handle 
which version of pyqtbuilder to import.

Phil


More information about the PyQt mailing list