diff options
author | Marco 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) |
commit | 9dfe3519d60e27afa20e129d2c87e8f11a1b533c (patch) | |
tree | 78acfb2b18063556a3a2f9afec72453bb4f560a7 | |
parent | abc4e00a849c7a48a453e56c6b210cac76457cd3 (diff) |
Deal with the fact that .pth doesn't work out of system path.
-rw-r--r-- | config.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 |