ANN: SIP v6.7.0 and PyQt-builder v1.14.0 Released

Ben Greiner code-pyqt at bnavigator.de
Mon Oct 3 19:35:57 BST 2022


Hi Phil.

Trying to build PyQt6 6.4 with SIP 6.7 on Python 3.8 fails:

[   40s] + sip-build-3.8 --verbose --api-dir /usr/share/qt6/qsci/api/python_3.8/ --no-make --qmake=/usr/lib64/qt6/bin/qmake --qmake-setting 'QMAKE_CFLAGS += -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --qmake-setting 'QMAKE_CXXFLAGS += -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g ' --pep484-pyi --confirm-license --qt-shared
[   40s] Querying qmake about your Qt installation...
[   40s] /usr/lib64/qt6/bin/qmake -query
[   40s] This is the GPL version of PyQt 6.4.0 (licensed under the GNU General Public License) for Python 3.8.14 on linux.
...
[  134s] These bindings will be built: QtCore, QtNetwork, QtGui, QtQml, QtWidgets, QtDBus, QtDesigner, QtHelp, QtOpenGL, QtOpenGLWidgets, QtPrintSupport, QtQuick, QtQuick3D, QtQuickWidgets, QtSql, QtSvg, QtSvgWidgets, QtTest, QtXml, QtMultimedia, QtMultimediaWidgets, QtPositioning, QtRemoteObjects, QtSensors, QtSerialPort, QtWebChannel, QtWebSockets, QtBluetooth, QtNfc, QtPdf, QtPdfWidgets, QtTextToSpeech.
[  134s] Generating the QtCore bindings...
[  138s] sip-build-3.8: An internal error occurred...
[  138s] Traceback (most recent call last):
[  138s]   File "/usr/bin/sip-build-3.8", line 33, in <module>
[  138s]     sys.exit(load_entry_point('sip==6.7.0', 'console_scripts', 'sip-build')())
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/tools/build.py", line 37, in main
[  138s]     handle_exception(e)
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/exceptions.py", line 81, in handle_exception
[  138s]     raise e
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/tools/build.py", line 34, in main
[  138s]     project.build()
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/project.py", line 244, in build
[  138s]     self.builder.build()
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/builder.py", line 48, in build
[  138s]     self._generate_bindings()
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/builder.py", line 277, in _generate_bindings
[  138s]     buildable = bindings.generate()
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/bindings.py", line 171, in generate
[  138s]     resolve(spec)
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/resolver/resolver.py", line 95, in resolve
[  138s]     _resolve_module(spec, spec.modules[0], error_log)
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/resolver/resolver.py", line 216, in _resolve_module
[  138s]     _resolve_typedefs(spec, mod, error_log)
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/resolver/resolver.py", line 816, in _resolve_typedefs
[  138s]     _resolve_type(spec, typedef.module, typedef.scope, typedef.type,
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/resolver/resolver.py", line 1751, in _resolve_type
[  138s]     _search_mapped_types(spec, mod, type)
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/resolver/resolver.py", line 1923, in _search_mapped_types
[  138s]     if same_base_type(mapped_type.type, type):
[  138s]   File "/usr/lib64/python3.8/site-packages/sipbuild/generator/utils.py", line 408, in same_base_type
[  138s]     for ad1, ad2 in zip(td1.types.args, td2.types.args, strict=True):
[  138s] TypeError: zip() takes no keyword arguments
[  138s] error: Bad exit status from /var/tmp/rpm-tmp.ogpcHj (%build)


The strict keyword for zip has only been added in Python 3.10. According to the setup.py/pyproject.toml, SIP and PyQt6 officially support Python >=3.7.

I see that the failing line is not even new from the diff between SIP 6.6.2 and SIP 6.7. Maybe you should consider setting up a CI with a proper python version test matrix and also check code coverage.

Regards,
Ben


More information about the PyQt mailing list