[gobject-introspection] build: extend PYTHONPATH instead of replacing it. Fixes #126



commit 3327be62d66f0f0c77631657543e791cbcd023a8
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Dec 15 10:45:52 2018 +0100

    build: extend PYTHONPATH instead of replacing it. Fixes #126
    
    So we don't ignore any PYTHONPATH set by the user.

 common.mk       | 4 ++--
 tests/gi-tester | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/common.mk b/common.mk
index b778f7aa..64fb02f0 100644
--- a/common.mk
+++ b/common.mk
@@ -10,7 +10,7 @@ INTROSPECTION_SCANNER = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
         CC="$(CC)" \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-scanner
@@ -42,7 +42,7 @@ INTROSPECTION_COMPILER_ARGS = \
 INTROSPECTION_DOCTOOL = \
     env PATH=".libs:$(PATH)" \
         LPATH=.libs \
-        PYTHONPATH=$(top_builddir):$(top_srcdir) \
+        PYTHONPATH="$(top_builddir):$(top_srcdir):$(PYTHONPATH)" \
         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
         $(top_builddir)/g-ir-doc-tool
diff --git a/tests/gi-tester b/tests/gi-tester
index 98817d1d..1c92fe3a 100755
--- a/tests/gi-tester
+++ b/tests/gi-tester
@@ -111,7 +111,8 @@ def main(argv):
             filter(
                 None,
                 [os.environ.get("top_builddir"),
-                 os.environ.get("top_srcdir")]))
+                 os.environ.get("top_srcdir"),
+                 os.environ.get("PYTHONPATH")]))
         subprocess.check_call([env["PYTHON"], targetname], env=env)
     else:
         raise SystemError("Unknown file type: %s" % targetbase)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]