gstreamer/subprojects/gst-python
Thibault Saunier 1babccfe50 python: Fix using overrides when not building PyGObject
Since 547570cd79 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.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1155>
2021-10-15 20:51:41 +00:00
..
examples Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
gi python: Fix using overrides when not building PyGObject 2021-10-15 20:51:41 +00:00
old_examples Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
plugin Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
testsuite Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
AUTHORS Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
ChangeLog Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
COPYING Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
gst-python.doap Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
meson.build Back to development 2021-09-26 01:07:02 +01:00
meson_options.txt Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
NEWS Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
README Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00
RELEASE doc: update IRC links to OFTC 2021-09-28 10:11:15 +10:00
TODO Move files from gst-python into the "subprojects/gst-python//" subdir 2021-09-24 16:16:05 -03:00

This file will be autogenerated.  Please read README-docs.