[PyQt] sip issue in Makefile generation on *BSD with Qt5

Anthony Mallet tho at useless-ficus.net
Wed Sep 26 22:16:50 BST 2018


The attached patch was added to the pkgsrc (https://www.pkgsrc.org)
package for sip. It handles the renaming of Qt5 modules to library
names when Qt5 is in use, in the _qt_module_to_lib() function found in
siputils.py. Basically, the issue is that not only linux needs to
rename Qt5 modules, but also virtually any system supported by
pkgsrc, in particular NetBSD. I thought it would be useful to submit
the patch here as well, as it also applies to users manually compiling
sip on systems other than linux.

In the attached patch I added an explicit test for darwin, because I
don't know if the Qt5 renaming should take place on darwin or not (and
I have no readily available darwin setup to check it myself).

Feel free to request any information in case the patch itself is not


--- siputils.py~	2018-09-25 23:02:04.871464266 +0200
+++ siputils.py	2018-09-25 23:06:07.802433336 +0200
@@ -881,7 +881,7 @@
                     qt5_rename = True
                     lib = lib + "4"
- elif sys.platform.startswith("linux") and qt_version >= 0x050000:
+ elif sys.platform != "darwin" and qt_version >= 0x050000:
             qt5_rename = True
         if qt5_rename:

More information about the PyQt mailing list