Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2008-04-18 22:23:33 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2008-04-18 22:23:33 (GMT)
commit9dfe3519d60e27afa20e129d2c87e8f11a1b533c (patch)
tree78acfb2b18063556a3a2f9afec72453bb4f560a7
parentabc4e00a849c7a48a453e56c6b210cac76457cd3 (diff)
Deal with the fact that .pth doesn't work out of system path.
-rw-r--r--config.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/config.py b/config.py
index a326e3f..404a892 100644
--- a/config.py
+++ b/config.py
@@ -1,4 +1,5 @@
import os
+import sys
import jhbuild.config
@@ -61,5 +62,18 @@ class Config(jhbuild.config.Config):
os.environ['SUGAR_PATH'] = os.path.join(self.prefix, 'share', 'sugar')
os.environ['SUGAR_LOGGER_LEVEL'] = 'debug'
+ # We need to add the gtk-2.0 directory explicitly to
+ # the Python path since '.pth' files (here pygtk.pth)
+ # only work properly in system directories
+ pythonversion = 'python' + str(sys.version_info[0]) + '.' + \
+ str(sys.version_info[1])
+ if self.use_lib64:
+ pythonpath = os.path.join(self.prefix, 'lib64', pythonversion,
+ 'site-packages', 'gtk-2.0')
+ else:
+ pythonpath = os.path.join(self.prefix, 'lib', pythonversion,
+ 'site-packages', 'gtk-2.0')
+ jhbuild.config.addpath('PYTHONPATH', pythonpath)
+
python_lib = os.path.join(self.prefix, 'lib', 'python2.5', 'site-packages')
os.environ['PYTHON_LIB'] = python_lib