3

I would like to create Python3 bindings for a glib/gobject based library, namely infinote/libinfinity.

I am a bit puzzled about the necessary steps to accomplish this. Does PyGObject help here or not? Is this guide still valid for python3 and PyGObject?
If not, what do I need to read to understand how this will work?
Are there any tools to (semi-)automate the process?

1 Answer 1

3

You need GObject Introspection. Here is an overview page, and here are instructions on how to integrate it into your project if you use Autotools (which I see you do.)

That's really all you need. Say you name your introspection repository Infinity-1.0.gir. Then, after building and installing, all you need to do in Python is

from gi.repository import Infinity

And presto, your library is now usable from Python.

(PS. The guide you linked to is outdated.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.