diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2011-09-10 10:58:07 +0200 |
---|---|---|
committer | Luca Falavigna <dktrkranz@debian.org> | 2011-09-10 10:58:07 +0200 |
commit | 7d0cf46e8ad5acb1028a391255a9b84d2f6d3cdf (patch) | |
tree | bcf7a54e7f8ad198e6d31adf0fffc0e0c74469e4 /script/scons | |
parent | de2237c3cf3dd7dcc0a914f78348fdb6d821c296 (diff) | |
parent | 9dc7be6c34e2bda6d0d96a450bb8eee03b277ba3 (diff) |
Merge commit 'upstream/2.1.0'
Diffstat (limited to 'script/scons')
-rw-r--r-- | script/scons | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/script/scons b/script/scons index bf84bf0..0e5b8ec 100644 --- a/script/scons +++ b/script/scons @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -22,22 +22,20 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -__revision__ = "src/script/scons.py 5134 2010/08/16 23:02:40 bdeegan" +__revision__ = "src/script/scons.py 5357 2011/09/09 21:31:03 bdeegan" -__version__ = "2.0.1" +__version__ = "2.1.0" -__build__ = "r5134" +__build__ = "r5357[MODIFIED]" -__buildsys__ = "cooldog" +__buildsys__ = "ubuntu" -__date__ = "2010/08/16 23:02:40" +__date__ = "2011/09/09 21:31:03" __developer__ = "bdeegan" import os -import os.path import sys ############################################################################## @@ -61,7 +59,8 @@ import sys # If so exit with error message try: if sys.version_info >= (3,0,0): - msg = "scons: *** SCons version %s does not run under Python version %s.\n" + msg = "scons: *** SCons version %s does not run under Python version %s.\n\ +Python 3.0 and later are not yet supported.\n" sys.stderr.write(msg % (__version__, sys.version.split()[0])) sys.exit(1) except AttributeError: @@ -89,8 +88,22 @@ libs.append(os.path.abspath(local)) scons_version = 'scons-%s' % __version__ +# preferred order of scons lookup paths prefs = [] +try: + import pkg_resources +except ImportError: + pass +else: + # when running from an egg add the egg's directory + try: + d = pkg_resources.get_distribution('scons') + except pkg_resources.DistributionNotFound: + pass + else: + prefs.append(d.location) + if sys.platform == 'win32': # sys.prefix is (likely) C:\Python*; # check only C:\Python*. @@ -159,19 +172,6 @@ else: # Check /usr/libfoo/scons*. prefs.append(libpath) - try: - import pkg_resources - except ImportError: - pass - else: - # when running from an egg add the egg's directory - try: - d = pkg_resources.get_distribution('scons') - except pkg_resources.DistributionNotFound: - pass - else: - prefs.append(d.location) - # Look first for 'scons-__version__' in all of our preference libs, # then for 'scons'. libs.extend([os.path.join(x, scons_version) for x in prefs]) |