Progress report on Py*5 binding generation

Shaheed Haque srhaque at theiet.org
Sat Apr 16 15:45:47 BST 2016


Hi all,

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 [1] generate a set of SIP files [2] which require just a
couple of simple hand edits [3] 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
significant milestone.

The next steps are to pursue the crash, the rest of the fanout, also
automate the hand edits and...eventually get some bindings to
compile/load/work.

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!

Thanks, Shaheed

[1] http://commits.kde.org/pykde5/b25bb676d3413303a1875ecaf45dca814737c3e5

[2] 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
1870
$ find tmp -name \*.sip | grep -v mod.sip | wc -l
1715

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.

[2] This is the procedure if you want to try it out:

#
# 1. Run the SIP generation phase.
#
./sip_bulk_generator.py tmp
#
# 2. Add import for KParts "%Import KParts/KParts/KPartsmod.sip" to this file:
#
vim tmp/KCoreAddons/KCoreAddonsmod.sip
#
#
# 3. Remove import of KCoreAddonsmod from these files:
#
vim tmp/KIOCore/kio/kiomod.sip tmp/KService/KServicemod.sip
tmp/KAuth/KAuthmod.sip
#
# 4. Fixup missing bits.
#
touch tmp/KAuth/kauth.sip
#
# 5. Run the compiler...
#
./sip_compiler.py -v cxx tmp KCoreAddons/KCoreAddonsmod.sip
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


More information about the kde-core-devel mailing list