summaryrefslogtreecommitdiffstats
path: root/src/script/sconsign.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-16 15:58:05 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-16 15:58:05 (GMT)
commita5a4fd46d7908d5f81ec81fdb304a0f0f8b9facc (patch)
tree88546a5ef623a859f6cdc05f01414232996b8e37 /src/script/sconsign.py
parent812c39883da45f94b3c0e427af8504f1aab76a7f (diff)
downloadSCons-a5a4fd46d7908d5f81ec81fdb304a0f0f8b9facc.zip
SCons-a5a4fd46d7908d5f81ec81fdb304a0f0f8b9facc.tar.gz
SCons-a5a4fd46d7908d5f81ec81fdb304a0f0f8b9facc.tar.bz2
Fix SCons on SuSE/AMD-64 Linux by having the wrapper script also check for the build engine in the parent directory of the Python library directory. (Gottfried Ganssauge)
Diffstat (limited to 'src/script/sconsign.py')
-rw-r--r--src/script/sconsign.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/script/sconsign.py b/src/script/sconsign.py
index a886fee..3303916 100644
--- a/src/script/sconsign.py
+++ b/src/script/sconsign.py
@@ -130,6 +130,23 @@ else:
prefs))
prefs = temp
+ # Add the parent directory of the current python's library to the
+ # preferences. On SuSE-91/AMD64, for example, this is /usr/lib64,
+ # not /usr/lib.
+ try:
+ libpath = os.__file__
+ except AttributeError:
+ pass
+ else:
+ while libpath:
+ libpath, tail = os.path.split(libpath)
+ if tail[:6] == "python":
+ break
+ if libpath:
+ # Python library is in /usr/libfoo/python*;
+ # check /usr/libfoo/scons*.
+ prefs.append(libpath)
+
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend(map(lambda x: os.path.join(x, scons_version), prefs))