[PySide] PySide and the nuitka python compiler

Vincent Barrielle vincent.barrielle at m4x.org
Mon Feb 3 17:42:31 CET 2014


Hello,

I'm using the nuitka python compiler (http://nuitka.net) in conjunction with 
PySide. However, this won't work with the current PySide version. According to 
Nuitka's main developper, this is a common problem when using nuitka with 
toolkit bindings, and requires some fix in the toolkits. For instance, he 
contributed patches fixing wxWdiget (http://trac.wxwidgets.org/ticket/14025)
and PyQt4 (http://www.freelists.org/post/nuitka-dev/C-libraries-that-call-back-into-compiled-instance-methods,2).

Following these examples, I've found some fixes that enable PySide to work 
correctly when run under Nuitka (patches attached).

There were two issues that prevented PySide to run with Nuitka.

The first one was that the slot registration mechanism was guarded by a 
PyFunction_Check which doesn't work with Nuitka's compiled functions, and the 
mechanism that added the "_slots" attribute to the slots was also making the 
assumption that it would be called on a PyFunctionObject.

The second issue was in shiboken, the wrapping procedure was using 
PyMethod_Check.

I hope these patches can get merged. If you feel these patches are not ready 
for merge yet, please let me know.

Regards,

Vincent Barrielle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-slot-registration-when-running-under-the-Nuitka-.patch
Type: text/x-patch
Size: 2297 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140203/0598abdc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enable-wrapping-of-functions-compiled-by-Nuitka.patch
Type: text/x-patch
Size: 1411 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140203/0598abdc/attachment-0001.bin>


More information about the PySide mailing list