summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/scons.py17
-rw-r--r--src/script/sconsign.py17
2 files changed, 34 insertions, 0 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index 11a24cb..4852d01 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -129,6 +129,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))
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))