[jhbuild] add installation python directory to sys.path



commit 04edae2eab11c079a2987d57f5f0afe0249b55a8
Author: Frédéric Péters <fpeters 0d be>
Date:   Tue Jun 9 21:31:50 2009 +0200

    add installation python directory to sys.path
---
 scripts/Makefile.am |    1 +
 scripts/jhbuild.in  |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 3688e15..d480572 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -13,6 +13,7 @@ jhbuild: jhbuild.in
 		-e s!\ pkgdatadir\@!$(pkgdatadir)!	\
 		-e s!\ libexecdir\@!$(libexecdir)!	\
 		-e s!\ libdir\@!$(libdir)!		\
+		-e s!\ pythondir\@!$(pythondir)!	\
 		-e s!\ PACKAGE\@!$(PACKAGE)!		\
 		-e s!\ VERSION\@!$(VERSION)!		\
 		< $< > $@
diff --git a/scripts/jhbuild.in b/scripts/jhbuild.in
index 817a83b..dc9ccdf 100644
--- a/scripts/jhbuild.in
+++ b/scripts/jhbuild.in
@@ -16,6 +16,8 @@ else:
     pkgdatadir = "@pkgdatadir@"
     datadir = "@datadir@"
     srcdir = "@srcdir@"
+    if '@pythondir@' not in sys.path:
+        sys.path.insert(0, '@pythondir@')
     try:
         import jhbuild
     except ImportError:



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