[jhbuild] [config] pass jhbuild prefix to distutils



commit 15dacd4baa8b98c69d438640fd6a13395adad2fa
Author: Frédéric Péters <fpeters 0d be>
Date:   Mon Aug 24 14:11:49 2009 +0200

    [config] pass jhbuild prefix to distutils
    
    Debian/Ubuntu now (since python 2.6) uses dist-packages instead of
    site-packages in the python installation path. It seems that the idea is
    that python stuff installed by the distro goes to dist-packages while
    python stuff locally installed in another prefix goes to site-packages.
    
    Therefore distutils.sysconfig.get_python_lib() returns different things
    depending on the prefix provided; so we pass the jhbuild prefix so we
    act according to the system policy.
    
    (GNOME bug 592558)

 jhbuild/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 4b42ef0..bfa0826 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -387,7 +387,7 @@ class Config:
         try:
             python_packages_dir = get_output([python_bin, '-c',
                 'import os, distutils.sysconfig; '\
-                'print distutils.sysconfig.get_python_lib(prefix="").split(os.path.sep)[-1]'],
+                'print distutils.sysconfig.get_python_lib(prefix="%s").split(os.path.sep)[-1]'] % self.prefix,
                 get_stderr=False).strip()
         except CommandError:
             python_packages_dir = 'site-packages'



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