Fix SCons on SuSE/AMD-64 Linux by having the wrapper script also check for the build...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 16 Sep 2004 15:58:05 +0000 (15:58 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 16 Sep 2004 15:58:05 +0000 (15:58 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1076 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/script/scons.py
src/script/sconsign.py

index ffd0abb8baf2871ae779113136721e7b485e32d2..76dec9ac92cd6ed26728c3a71a93f25c29152535 100644 (file)
@@ -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
index 11a24cb1d0fe7b8a5afbe0246b764505da694d14..4852d01a0962c0bce5f617c9b1f2a34fb985756c 100644 (file)
@@ -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))
index a886fee6629e61d955d4ad32582dab5ccea1f04c..3303916c41132ef9aad5ad613fd552f504daa819 100644 (file)
@@ -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))