[gstreamer-bugs] [Bug 623105] New: gstpythonplugin.c does not import user's gobject module

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jun 29 02:17:24 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=623105
  GStreamer | gst-python | git

           Summary: gstpythonplugin.c does not import user's gobject
                    module
    Classification: Desktop
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-python
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: lsinger at caltech.edu
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


Created an attachment (id=164869)
 --> (https://bugzilla.gnome.org/attachment.cgi?id=164869)
proposed patch

If a user has his/her own installation of pygobject and pygtk, the Python
plugin loader in plugin/gstpythonplugin.c will load the gobject module found in
the top-level site-packages directory, instead of the user's version of
gobject.

In Python modules, it appears to be common practice to import gobject using the
following recipe:

import pygtk
pygtk.require("2.0")
import gobject

And doing this causes the user's version of gobject (which would be in a
site-packages directory that occurs earlier in sys.path) to supersede the
top-level site-packages directory.

This is, in fact, what is done in the "gst" module's __init__.py file.

This practice is also mentioned on the following two pages:
http://gstreamer.freedesktop.org/wiki/FAQ#Mypygstprogramismysteriouslycoredumping.2Chowtofixthis.3F
http://faq.pygtk.org/index.py?req=show&file=faq02.004.htp

The attached patch adds a C equivalent of this procedure to gstpythonplugins.c.
 It does result in the "correct" version of gobject being loaded.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list