mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
Tests: the sys.meta_path trick does not work for python2
Instead, for python2 revert to manipulating gi.overrides.__path__
This commit is contained in:
parent
d64bbc1e0c
commit
f79ac2d143
1 changed files with 7 additions and 1 deletions
|
@ -25,4 +25,10 @@ class GstOverrideImport:
|
||||||
sys.modules[name] = module
|
sys.modules[name] = module
|
||||||
return module
|
return module
|
||||||
|
|
||||||
|
if sys.version_info.major >= 3:
|
||||||
sys.meta_path.insert(0, GstOverrideImport())
|
sys.meta_path.insert(0, GstOverrideImport())
|
||||||
|
else:
|
||||||
|
import gi.overrides
|
||||||
|
|
||||||
|
gi.overrides.__path__.append(os.environ.get('GST_OVERRIDE_SRC_PATH'))
|
||||||
|
gi.overrides.__path__.append(os.environ.get('GST_OVERRIDE_BUILD_PATH'))
|
||||||
|
|
Loading…
Reference in a new issue