sip-build fails with AttributeError
Guðjón Guðjónsson
gudjon.i.gudjonsson at gmail.com
Wed Feb 15 09:05:28 GMT 2023
Hi list
I am trying to build my library with PyQt6 but it fails with the error
message shown below [1]
It builds without problems for PyQt5 and I did compile Qscintilla for Qt5/6
on the same system so the setup should be ok.
I invoke the build with [2]
All source code can be found at:
https://github.com/GauiStori/PyQt-Qwt/tree/test
I tried to debug the sip-build script in eric but without success. Can
anyone please help me on how to get more information about this
AtttributeError?
"AttributeError: 'NoneType' object has no attribute 'default_metatype'"
Regards
Gudjon
[1]
sip-build: An internal error occurred...
Traceback (most recent call last):
File "/usr/bin/sip-build", line 33, in <module>
sys.exit(load_entry_point('sip==6.7.7', 'console_scripts',
'sip-build')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/sipbuild/tools/build.py", line 37, in
main
handle_exception(e)
File "/usr/lib/python3/dist-packages/sipbuild/exceptions.py", line 81, in
handle_exception
raise e
File "/usr/lib/python3/dist-packages/sipbuild/tools/build.py", line 34, in
main
project.build()
File "/usr/lib/python3/dist-packages/sipbuild/project.py", line 244, in
build
self.builder.build()
File "/usr/lib/python3/dist-packages/sipbuild/builder.py", line 48, in
build
self._generate_bindings()
File "/usr/lib/python3/dist-packages/sipbuild/builder.py", line 277, in
_generate_bindings
buildable = bindings.generate()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/sipbuild/bindings.py", line 172, in
generate
resolve(spec, modules)
File
"/usr/lib/python3/dist-packages/sipbuild/generator/resolver/resolver.py",
line 94, in resolve
_set_mro(spec, klass, error_log)
File
"/usr/lib/python3/dist-packages/sipbuild/generator/resolver/resolver.py",
line 763, in _set_mro
klass.metatype = klass.iface_file.module.default_metatype
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'default_metatype
[2]
python3.11 /usr/bin/sip-build \
--verbose --no-make --pep484-pyi \
--qmake /usr/bin/qmake6 \
--qmake-setting 'QMAKE_CXXFLAGS += "-g -O2
-ffile-prefix-map=/home/gudjon/debian/PyQwt/PyQt-Qwt=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2"'
\
--qmake-setting 'QMAKE_LFLAGS += "-Wl,-z,relro"' \
--target-dir /usr/lib/python3/dist-packages \
--build-dir build-qt6 \
--qwt-lib=qwt-qt6 \
--qwt-incdir=/usr/include/qwt \
--api-dir /usr/share/qt6/api/python3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230215/f516caf2/attachment.htm>
More information about the PyQt
mailing list