diff options
-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 |