[PyQt] Additional note to current sip/PyQt5 build

Hans-Peter Jansen hpj at urpla.net
Mon Jul 4 10:15:22 BST 2016


Hi Phil,

a cursory look over the PyQt5 build log revealed another minor issue, related 
to line# tags for sip files in the generated sources. 

Try this:

$ grep -r 'sip/QtCore/qglobal\.sip' build-dir
./QtCore/sipQtCorecmodule.cpp:#line 24 "/home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/qglobal.sip"
./QtCore/sipQtCorecmodule.cpp:#line 32 "/home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/qglobal.sip"
./QtCore/sipQtCorecmodule.cpp:#line 136 "/home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/qglobal.sip"
./QtCore/sipQtCorecmodule.cpp:#line 217 "/home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/qglobal.sip"
./QtCore/sipQtCorecmodule.cpp:#line 210 "/home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/qglobal.sip"
[...]
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 111 "sip/QtCore/qglobal.sip"
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 106 "sip/QtCore/qglobal.sip"
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 101 "sip/QtCore/qglobal.sip"
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 95 "sip/QtCore/qglobal.sip"
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 89 "sip/QtCore/qglobal.sip"
./QtGui/sipQtGuiQTouchDeviceCapabilities.cpp:#line 116 "sip/QtCore/qglobal.sip"
[...]

The sip file line tags are absolute paths in the QtCore module, but relative 
in the other modules. An attempt to extract debug info from the build
results in accessing the wrong path for relative locations:

cpio: PyQt5_gpl-5.6/QtBluetooth/sip/QtCore/qglobal.sip: Cannot stat: No such file or directory

PyQt5's configure.py seem to call sip correctly pathwise:

/usr/bin/sip -w -f -t WS_X11 -t Qt_5_6_1 -B Qt_6_0_0 -o -P -a QtCore.api -c /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/QtCore -I sip -I /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtCore/QtCoremod.sip

/usr/bin/sip -w -f -t WS_X11 -t Qt_5_6_1 -B Qt_6_0_0 -o -P -a QtGui.api -c /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/QtGui -I sip -I /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip /home/abuild/rpmbuild/BUILD/PyQt5_gpl-5.6/sip/QtGui/QtGuimod.sip

I've tried to locate the responsible place in sip for this behaviour, but 
didn't revealed something obvious. I guess, it's related to the inter 
dependencies of the sip files themselves.

Some realpath hackery in gencode:generatePreprocLine() isn't anything that you 
would let get near your baby anyway, do you?

Pete


More information about the PyQt mailing list