Progress report on Py*5 binding generation
srhaque at theiet.org
Sat Apr 16 15:45:47 BST 2016
This is a quick update on the Py*5 bindings generation attempt, and
specifically on PyKF5. The binding generator with the PyKF5-specific
rules can now  generate a set of SIP files  which require just a
couple of simple hand edits  to process KDECoreAddons with no
syntax errors, but ending in a crash in the SIP 4.16.9 compiler.
Now that might not seem very useful, but in fact, because of the
fanout involved, a big chunk of KF5 has been syntax checked.
Obviously, there could be more errors hiding behind the crash, or in
parts of KF5 not yet covered by the fanout, but this does feel like a
The next steps are to pursue the crash, the rest of the fanout, also
automate the hand edits and...eventually get some bindings to
At any rate, once I get a little further, I plan to propose a merge to
master (in pykde5.git). As always, help and comments welcome!
 The SIP files are from all the files in my PyKF5 tree except the
xxx_export.h files. From 1870 files, I am creating 1715 .sip files:
$ find /usr/include/KF5/ -name \*.h | grep -v _export.h | wc -l
$ find tmp -name \*.sip | grep -v mod.sip | wc -l
From the above set, the procedure excluded all the KDELibs4Support
files, and I also had to slash a burn a few things (using the
rules-engine), mostly related to templating in various forms. It
remains to be seen what parts of this, especially certain categories
of template usage might be amenable to automation once I figure out
how SIP actually works.
 This is the procedure if you want to try it out:
# 1. Run the SIP generation phase.
# 2. Add import for KParts "%Import KParts/KParts/KPartsmod.sip" to this file:
# 3. Remove import of KCoreAddonsmod from these files:
vim tmp/KIOCore/kio/kiomod.sip tmp/KService/KServicemod.sip
# 4. Fixup missing bits.
# 5. Run the compiler...
./sip_compiler.py -v cxx tmp KCoreAddons/KCoreAddonsmod.sip
Kde-bindings mailing list
Kde-bindings at kde.org
More information about the kde-core-devel