LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   pygobject and gobject-introspection in -current (https://www.linuxquestions.org/questions/slackware-14/pygobject-and-gobject-introspection-in-current-4175417669/)

audriusk 07-19-2012 03:41 PM

pygobject and gobject-introspection in -current
 
Hi,

Today I have stumbled upon an interesting Python library WeasyPrint, which uses pygobject in a seemingly new way and unfortunately doesn't work on Slackware-current. Perhaps this way is not really new, but since I haven't seen it before until today, it's new to me. :) import statements in that library are written as follows:
Code:

from gi.repository import GObject
And so on, but gi.repository (or gi module itself) can't be imported. After looking around on the net, I made a connection between gi.repository and gobject-introspection package which recently landed into -current.

So, I was wondering, if this gi.repository stuff should be in gobject-introspection package? Or maybe pygobject? I understand that Slackware team is very busy right now, fixing all sorts of things that broke after last big batch of updates, so I won't be expecting answers from them, but maybe someone else has some clues about this.

ppr:kut 07-22-2012 02:50 AM

There seems to be a module PyGi, which was recently integrated into pygobject. The version in -current seems to be from before that happened, but
I don't know if a newer version is compatible with the pygtk stuff that's also there. You can try either installing the standalone PyGi or upgrading pygobject and see how it goes

audriusk 07-22-2012 11:16 AM

Thank you for the answer.

After playing a bit with pygobject SlackBuild, I decided to write a separate one for the latest version, seeing that 2.x and 3.x don't have any files with the same names. Installed the package, all seems fine, old PyGTK apps still work, while WeasyPrint is functioning as well. Feeling happy. :)

Here's the SlackBuild itself for those, who will need it for some app. If PyGObject 3.x won't be included in the next Slackware version, I'll submit it to SBo.


All times are GMT -5. The time now is 07:22 AM.