diff options
author | Steven Knight <knight@baldmt.com> | 2004-09-16 15:58:05 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-09-16 15:58:05 (GMT) |
commit | a5a4fd46d7908d5f81ec81fdb304a0f0f8b9facc (patch) | |
tree | 88546a5ef623a859f6cdc05f01414232996b8e37 /src/script | |
parent | 812c39883da45f94b3c0e427af8504f1aab76a7f (diff) | |
download | SCons-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')
-rw-r--r-- | src/script/scons.py | 17 | ||||
-rw-r--r-- | src/script/sconsign.py | 17 |
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)) |