mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
gst-python: Drop obselete python2 code path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6007>
This commit is contained in:
parent
3f675cb479
commit
3321851786
1 changed files with 2 additions and 6 deletions
|
@ -2,6 +2,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import imp
|
import imp
|
||||||
|
|
||||||
|
|
||||||
class GstOverrideImport:
|
class GstOverrideImport:
|
||||||
def find_module(self, fullname, path=None):
|
def find_module(self, fullname, path=None):
|
||||||
if fullname in ('gi.overrides.Gst', 'gi.overrides._gi_gst'):
|
if fullname in ('gi.overrides.Gst', 'gi.overrides._gi_gst'):
|
||||||
|
@ -25,10 +26,5 @@ 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())
|
|
||||||
else:
|
|
||||||
import gi.overrides
|
|
||||||
|
|
||||||
gi.overrides.__path__.append(os.environ.get('GST_OVERRIDE_SRC_PATH'))
|
sys.meta_path.insert(0, GstOverrideImport())
|
||||||
gi.overrides.__path__.append(os.environ.get('GST_OVERRIDE_BUILD_PATH'))
|
|
||||||
|
|
Loading…
Reference in a new issue