Python bindings

Andrew Bird ajb at spheresystems.co.uk
Wed Nov 14 07:31:53 PST 2012


On Wednesday 14 November 2012 16:20:52 Aleksander Morgado wrote:
> On 14/11/12 15:40, Andrew Bird wrote:
> > On Wednesday 14 November 2012 11:53:08 Andrew Bird wrote:
> >> Hi all,
> >> 
> >> 	I want to try out libqmi from python using bindings. I'm trying to 
apply
> >> 
> >> the process from
> >> https://live.gnome.org/GObjectIntrospection/AutotoolsIntegration
> >> 
> >> After fitting most of it to the Makefile.am in the generated directory(is
> >> that the correct place?) I get the following errors
> >> 
> >> make[4]: Entering directory `/home/ajb/libqmi/libqmi-glib/generated'
> >> 
> >>   GISCAN libqmi_glib-1.0.gir
> >> 
> >> In file included from /home/ajb/libqmi/libqmi-glib/generated/qmi-error-
> >> types.h:6:0,
> >> 
> >>                  from <stdin>:4:
> >> ../../libqmi-glib/qmi-errors.h:27:2: error: #error "Only <libqmi-glib.h>
> >> can be included directly."
> >> In file included from /home/ajb/libqmi/libqmi-glib/generated/qmi-enum-
> >> types.h:6:0,
> >> 
> >>                  from <stdin>:5:
> >> ../../libqmi-glib/qmi-enums.h:27:2: error: #error "Only <libqmi-glib.h>
> >> can
> >> be included directly."
> >> In file included from /home/ajb/libqmi/libqmi-glib/generated/qmi-enum-
> >> types.h:7:0,
> >> 
> >>                  from <stdin>:5:
> >> ../../libqmi-glib/qmi-enums-wds.h:27:2: error: #error "Only
> >> <libqmi-glib.h>
> >> can be included directly."
> >> In file included from /home/ajb/libqmi/libqmi-glib/generated/qmi-enum-
> >> types.h:8:0,
> >> 
> >>                  from <stdin>:5:
> >> <snip>
> > 
> > I got a little further by adding '-DLIBQMI_GLIB_COMPILATION ' into the
> > gir_CFLAGS, but that seems like a hack. I'm now seeing lots of errors of
> > the form undefined reference to `qmi_client_get_type' etc. Am I totally
> > off course in what I'm trying to do? I've never done this before, as you
> > can probably tell :-)
> 
> -DLIBQMI_GLIB_COMPILATION is used when we are compiling internal stuff,
> so it's safe to do so within the build.
> 
> You probably want to run the GIR scanner not in /libqmi-glib/generated,
> but in /libqmi-glib directly. The code within /libqmi-glib/generated
> depends on the one in /libqmi-glib (e.g. the base QmiClient object which
> is failing here).

Aleksander,
	Thanks, I'm getting further now. Seems I have to fix some missing 
annotations now. I'll send patches later.

Andrew



More information about the libqmi-devel mailing list