Support for binding via GObject Introspection + PyGObject
Hello!
Disclaimer: it might be more of a question + feature request rather than issue.
My ultimate goal is to be able to use libqmi-glib's low-level functionality from high-level application written in Python.
I've found several quite old threads:
- https://lists.freedesktop.org/archives/libqmi-devel/2012-November/000363.html
- https://lists.freedesktop.org/archives/libqmi-devel/2012-November/000353.html
- https://lists.freedesktop.org/archives/libqmi-devel/2013-August/000600.html where the same idea was discussed and some changes were proposed to streamline/ease the use of libqmi for such purpose.
In short, the changes which were proposed back then were:
- modifying Makefile.am, configure.ac and src/libqmi-glib/Makefile.am was proposed in line with https://gi.readthedocs.io/en/latest/buildsystems/autotoolsintegration.html to support the option of --enable-introspection
- modifying comment blocks to comply with GObject-Introspection annotations format https://gi.readthedocs.io/en/latest/annotations/gtkdoc.html
As I understand, as of now libqmi doesn't directly support binding to Python without making (at least) these modifications (and maybe more). But it still seems possible, at least I was able to get libqmi imported from gi.repository (from gi.repository import libqmi as Qmi), but need help on what should be the call flow to create Qmi device, register it for services and call its methods.
So my questions and suggestions are:
- Is it indeed the most straightforward way to use libqmi's functionality from Python app? (except from using qmicli utility calls)
- Do you consider this as a viable way in general? i.e., should it work? :)
- If yes, do you want to incorporate above mentioned changes to the code? I can help with preparing the exact patches/changes. And maybe adding a short "getting started" to the documentation on how to compile libqmi with introspection and example of using libqmi's function calls from python (some simple call flow).