summaryrefslogtreecommitdiffstats
path: root/src/script/scons.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-10-12 12:44:26 (GMT)
committerSteven Knight <knight@baldmt.com>2003-10-12 12:44:26 (GMT)
commit57a6a5147897525742331568d9538371c7260cf8 (patch)
treed5fc001207fc31829a2bdb8d377b691a2f24e040 /src/script/scons.py
parent34f47299ed9fa4eb468201ae6e5cb4e0523a3dc2 (diff)
downloadSCons-57a6a5147897525742331568d9538371c7260cf8.zip
SCons-57a6a5147897525742331568d9538371c7260cf8.tar.gz
SCons-57a6a5147897525742331568d9538371c7260cf8.tar.bz2
More flexible RPM building. (Gerard Patel) Have scripts look for the build engine in the site-packages subdirectory as wel. (Charles Crain)
Diffstat (limited to 'src/script/scons.py')
-rw-r--r--src/script/scons.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index 501f071..a90e1ba 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -79,6 +79,7 @@ if sys.platform == 'win32':
# sys.prefix is (likely) C:\Python*;
# check only C:\Python*.
prefs.append(sys.prefix)
+ prefs.append(os.path.join(sys.prefix, 'Lib', 'site-packages'))
else:
# On other (POSIX) platforms, things are more complicated due to
# the variety of path names and library locations. Try to be smart
@@ -120,7 +121,11 @@ else:
# check only /foo/lib/scons*.
prefs.append(sys.prefix)
- prefs = map(lambda x: os.path.join(x, 'lib'), prefs)
+ temp = map(lambda x: os.path.join(x, 'lib'), prefs)
+ temp.extend(map(lambda x: os.path.join(x, 'lib', 'python%d.%d' % (sys.version_info[0],
+ sys.version_info[1]),
+ 'site-packages'), prefs))
+ prefs = temp
# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.