2015-04-24 08:35:14 +00:00
|
|
|
import os
|
2015-04-15 17:57:43 +00:00
|
|
|
import gi.overrides
|
|
|
|
|
|
|
|
if not gi.overrides.__path__[0].endswith("gst-python/gi/overrides"):
|
|
|
|
local_overrides = None
|
|
|
|
# our overrides don't take precedence, let's fix it
|
|
|
|
for i, path in enumerate(gi.overrides.__path__):
|
|
|
|
if path.endswith("gst-python/gi/overrides"):
|
|
|
|
local_overrides = path
|
|
|
|
|
2015-04-24 08:35:14 +00:00
|
|
|
if local_overrides:
|
|
|
|
gi.overrides.__path__.remove(local_overrides)
|
|
|
|
else:
|
|
|
|
local_overrides = os.path.abspath(os.path.join(__file__, "../", "../", "gi", "overrides"))
|
|
|
|
|
2015-04-15 17:57:43 +00:00
|
|
|
gi.overrides.__path__.insert(0, local_overrides)
|