PyKF5 bindings generator improvements out for review.

Shaheed Haque srhaque at theiet.org
Sat Jan 28 20:08:59 UTC 2017


Hi Steve,

I just published a review request:

https://git.reviewboard.kde.org/r/129900/

You see from the notes that there is a set of unit tests included that I
believe cover ~all the changes I made. You can also view the changes on
github here:

https://github.com/ShaheedHaque/extra-cmake-modules/tree/KDE_merge

All told, and with the judicious use of slash'n'burn rules to trim
uninteresting problems away, this can process all ~2300 .sip files for my
/usr/include/KF5: the results can be read by the SIP compiler except in a
handful of cases which are all to do with the semantics of the modules
concerned (i.e. I believe they are not bugs in the sip_generator itself).

All the code is squashed into the single commit. Feedback welcome here or
via reviewboard or via github.

Thanks, Shaheed

P.S. Not included in this request is the bulk tools (now renamed the
module_generator and module_compiler): if you want, you can look at them in
the second commit in this branch:

https://github.com/ShaheedHaque/extra-cmake-modules/tree/KDE_master_unit_tests

The reason why that might be interesting is that the second commit has
rules/support (not related to the module_xxx stuff) for automatically
generating %MappedTypes for dicts (QMap and QHash), lists (QVector and
QList) and sets (QSet) and also 1-D arrays as in "char [8]foo;". Though
these all produce cleanly-compilable code, neither has been actually run in
anger since I have not yet cracked the mystery of getting the right symbols
exported (something to do with moc, I think). However, I feel the generated
output demonstrates an approach which is VERY clean and arguably nicer than
some of hand-written code out there. See
https://github.com/ShaheedHaque/extra-cmake-modules/blob/KDE_master_unit_tests/find-modules/module_generation/PyQt_template_typecode.py
and
https://github.com/ShaheedHaque/extra-cmake-modules/blob/KDE_master_unit_tests/find-modules/module_generation/PyKF5_rules/kio.py
.

I'll come back with these when the symbol problem is solved as I believe
they are needed to properly unblock large chunks of KF5.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20170128/719edaf5/attachment.html>


More information about the Kde-bindings mailing list