<div dir="ltr"><div><div class="gmail_extra">Hi Steve,<br><br><div class="gmail_quote">On 22 April 2016 at 08:35, Stephen Kelly <span dir="ltr"><<a href="mailto:steveire@gmail.com" target="_blank">steveire@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">Stephen Kelly wrote:<br>
<br>
> "/usr/include/x86_64-linux-gnu/qt5,/usr/include/x86_64-linux-<br>
gnu/qt5/QtCore"<br>
> --select @kitemmodelsmod.sip sip cxx<br>
<br>
</span>Oops, the cxx at the end should be removed, but the end result is still that<br>
the module is reported as having an error:<br>
<br>
$ ./create_script.sh<br>
ERROR: Parse error /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:38[10]<br>
'stddef.h' file not found<br>
2016-04-22 09:35:03,078 __main__ INFO: Creating PyKF5/tmp/kitemmodels<br>
2016-04-22 09:35:03,078 __main__ DEBUG:<br>
PyKF5/tmp/kitemmodels/kitemmodelsmod.sip.tmp<br>
2016-04-22 09:35:03,078 __main__ INFO: /usr/bin/sip -c PyKF5/tmp/kitemmodels<br>
-b PyKF5/tmp/kitemmodels/module.sbf -x kitemmodelsmod_sip -x VendorID -t<br>
<span class="">WS_X11 -t Qt_5_4_2 -x Py_v3 -I/usr/share/sip/PyQt5 -Isip<br>
</span>PyKF5/tmp/kitemmodels/kitemmodelsmod.sip.tmp<br>
2016-04-22 09:35:03,406 __main__ INFO: make -f module.Makefile<br>
g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -<br>
<span class="">D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I. -I/usr/include/x86_64-linux-<br>
</span>gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/python2.7<br>
-o sipkitemmodelscmodule.o sipkitemmodelscmodule.cpp<br>
g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -<br>
<span class="">D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I. -I/usr/include/x86_64-linux-<br>
</span>gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/python2.7<br>
-o sipkitemmodelsKSelectionProxyModel.o<br>
sipkitemmodelsKSelectionProxyModel.cpp<br>
g++ -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -Wl,--version-<br>
<span class="">script=kitemmodels.exp -o kitemmodels.so sipkitemmodelscmodule.o<br>
sipkitemmodelsKSelectionProxyModel.o -lm /usr/lib/x86_64-linux-<br>
gnu/libQt5Core.so /usr/lib/x86_64-linux-gnu/libKF5ItemModels.so<br>
/usr/lib/x86_64-linux-gnu/<a href="http://libpython2.7.so" rel="noreferrer" target="_blank">libpython2.7.so</a><br>
</span>2016-04-22 09:35:03,665 __main__ INFO: Publishing PyKF5.kitemmodels<br>
<module 'PyQt5.QtCore' from '/usr/lib/python2.7/dist-<br>
packages/PyQt5/QtCore.so'><br>
<span class="">Traceback (most recent call last):<br>
</span> File "./pythontest.py", line 7, in <module><br>
from PyKF5 import kitemmodels<br>
<span class="im">SystemError: dynamic module not initialized properly<br></span></blockquote><div><br><br>I think the only thing you did wrong is the %Module declaration in kitemmodelsmod.sip. If I change it from:<br><br>%Module PyKDE5.kitemmodels<br><br>to<br><br>%Module PyKF5.kitemmodels<br><br>then it all seems to work:<br><br>$ ./create_script.sh <br>ERROR: Parse error /usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../../include/c++/5.3.1/cstddef:45[10] 'stddef.h' file not found<br>2016-04-22 20:39:23,846 __main__ INFO: Creating PyKF5/tmp/kitemmodels<br>2016-04-22 20:39:23,846 __main__ DEBUG: PyKF5/tmp/kitemmodels/kitemmodelsmod.sip.tmp<br>2016-04-22
20:39:23,846 __main__ INFO: /usr/bin/sip -c PyKF5/tmp/kitemmodels -b
PyKF5/tmp/kitemmodels/module.sbf -x kitemmodelsmod_sip -x VendorID -t
WS_X11 -t Qt_5_5_1 -x Py_v3 -I/usr/share/sip/PyQt5 -Istevesip
PyKF5/tmp/kitemmodels/kitemmodelsmod.sip.tmp<br>2016-04-22 20:39:24,149 __main__ INFO: make -f module.Makefile<br>g++
-c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I.
-I/usr/include/x86_64-linux-gnu/qt5
-I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/python2.7 -o
sipkitemmodelscmodule.o sipkitemmodelscmodule.cpp<br>g++ -c -g -O2
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -fPIC -Wall -W -DNDEBUG -I.
-I/usr/include/x86_64-linux-gnu/qt5
-I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/python2.7 -o
sipkitemmodelsKSelectionProxyModel.o
sipkitemmodelsKSelectionProxyModel.cpp<br>g++ -Wl,-Bsymbolic-functions
-Wl,-z,relro -shared -Wl,--version-script=kitemmodels.exp -o
kitemmodels.so sipkitemmodelscmodule.o
sipkitemmodelsKSelectionProxyModel.o -lm
/usr/lib/x86_64-linux-gnu/libQt5Core.so
/usr/lib/x86_64-linux-gnu/libKF5ItemModels.so
/usr/lib/x86_64-linux-gnu/<a href="http://libpython2.7.so">libpython2.7.so</a><br>2016-04-22 20:39:26,124 __main__ INFO: Publishing PyKF5.kitemmodels<br><module 'PyQt5.QtCore' from '/usr/lib/python2.7/dist-packages/PyQt5/<a href="http://QtCore.x86_64-linux-gnu.so">QtCore.x86_64-linux-gnu.so</a>'><br><br>And just to be sure:<br><br>$ python -c 'from PyKF5 import kitemmodels; print(kitemmodels)'<br><module 'PyKF5.kitemmodels' from 'PyKF5/kitemmodels.so'><br><br><div>Thanks, Shaheed<br></div><div><br></div> <span class="im"></span><br><span class="im">
</span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">Thanks,<br>
<br>
Steve.<br>
_______________________________________________<br>
Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br>
</div></div></blockquote></div><br></div></div></div>