summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-01 09:57:57 -0400
committerThibault Saunier <thibault.saunier@osg.samsung.com>2017-08-03 14:38:36 -0400
commita8aaada019db5665bb17cfa3808cc2f74d72a342 (patch)
tree8d9162b9e45a196099e23579939d6ef80eeeb383
parent425990047b519751cef24a4ba5e4d032108165ab (diff)
meson: Fix detection of overrides path in some cases
-rw-r--r--gi/overrides/__init__.py1
-rw-r--r--scripts/pythondetector13
2 files changed, 10 insertions, 4 deletions
diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
index 57abf1a..b36383a 100644
--- a/gi/overrides/__init__.py
+++ b/gi/overrides/__init__.py
@@ -1,4 +1,3 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
-print(__path__, __name__)
diff --git a/scripts/pythondetector b/scripts/pythondetector
index e633734..eec43da 100644
--- a/scripts/pythondetector
+++ b/scripts/pythondetector
@@ -58,9 +58,16 @@ if __name__ == "__main__":
# If we are installing in the same prefix as PyGobject
# make sure to install in the right place.
- import gi
- if os.path.commonprefix([gi._overridesdir, prefix]) == prefix:
- print(gi._overridesdir)
+ import gi.overrides
+
+ 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)
# Otherwise follow python's way of install site packages inside