mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
meson: Fix detection of overrides path in some cases
This commit is contained in:
parent
425990047b
commit
a8aaada019
2 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
||||||
from pkgutil import extend_path
|
from pkgutil import extend_path
|
||||||
|
|
||||||
__path__ = extend_path(__path__, __name__)
|
__path__ = extend_path(__path__, __name__)
|
||||||
print(__path__, __name__)
|
|
||||||
|
|
|
@ -58,9 +58,16 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# If we are installing in the same prefix as PyGobject
|
# If we are installing in the same prefix as PyGobject
|
||||||
# make sure to install in the right place.
|
# make sure to install in the right place.
|
||||||
import gi
|
import gi.overrides
|
||||||
if os.path.commonprefix([gi._overridesdir, prefix]) == prefix:
|
|
||||||
print(gi._overridesdir)
|
try:
|
||||||
|
gi.overrides.__path__.remove(os.path.abspath(os.path.join(
|
||||||
|
os.path.dirname(os.path.realpath(__file__)), '..', 'gi')))
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
overrides_path = gi.overrides.__path__[0]
|
||||||
|
if os.path.commonprefix([overrides_path, prefix]) == prefix:
|
||||||
|
print(overrides_path)
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
# Otherwise follow python's way of install site packages inside
|
# Otherwise follow python's way of install site packages inside
|
||||||
|
|
Loading…
Reference in a new issue