Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 718
    • Issues 718
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 369
    • Merge requests 369
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamergstreamer
  • Merge requests
  • !1155

python: Fix using overrides when not building PyGObject

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Thibault Saunier requested to merge thiblahute/gstreamer:overrides into main Oct 14, 2021
  • Overview 3
  • Commits 1
  • Pipelines 9
  • Changes 6

Since 547570cd we do not always build PyGObject and our development environment is broken when trying to use GStreamer python when built against system PyGObject with the following error importing Gst in there:

12345678** (gst-plugin-scanner:710617): CRITICAL **: 11:45:02.343: can't find gi.repository.Gst
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/gi/repository/__init__.py", line 23, in <module>
    from ..importer import DynamicImporter
  File "/usr/lib64/python3.9/site-packages/gi/importer.py", line 33, in <module>
    from .overrides import load_overrides
ImportError: cannot import name 'load_overrides' from 'gi.overrides' (/var/home/thiblahute/devel/gstreamer/gstreamer/subprojects/gst-editing-services/bindings/python/gi/overrides/__init__.py)
Factory Details:

The approach to fixing it is to implement override gi in gst-python/gi/ which we add to PYTHONPATH) and in there reset the gi module to the right place and we get overrides from paths from _GI_OVERRIDES_PATH we set in gst-env.py which points to all the overrides that will be installed.

cc @meh @hadess

Edited Oct 14, 2021 by Thibault Saunier
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: overrides