summaryrefslogtreecommitdiffstats
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)
commit6c2d8850f7400734226a2862391ca4e9a38a1342 (patch)
tree88546a5ef623a859f6cdc05f01414232996b8e37
parentf4ebab8479e70f7af040e5d918d1d2429770d2ae (diff)
downloadSCons-6c2d8850f7400734226a2862391ca4e9a38a1342.zip
SCons-6c2d8850f7400734226a2862391ca4e9a38a1342.tar.gz
SCons-6c2d8850f7400734226a2862391ca4e9a38a1342.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)
-rw-r--r--src/CHANGES.txt6
-rw-r--r--src/script/scons.py17
-rw-r--r--src/script/sconsign.py17
3 files changed, 40 insertions, 0 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index ffd0abb..76dec9a 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -19,6 +19,12 @@ RELEASE 0.97 - XXX
- Handle exceptions from Python functions a build actions.
+ From Gottfried Ganssauge:
+
+ - 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 (/usr/lib64 instead of /usr/lib).
+
From Steven Knight:
- When compiling with Microsoft Visual Studio, don't include the ATL and
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))