mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +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
|
||||
return module
|
||||
|
||||
sys.meta_path.insert(0, GstOverrideImport())
|
||||
if sys.version_info.major >= 3:
|
||||
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