diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-04-10 16:42:40 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-04-10 16:42:40 +0200 |
commit | 70639bffe44444b5faee83772cc3c73dc2e46fed (patch) | |
tree | 124bf797d20d37bf34c54e5a5a668c2e7cc2cea0 /script | |
parent | 6a570afd28bccdb118edde36488ba9834494d6c7 (diff) |
Imported Upstream version 2.5.0upstream/2.5.0
Diffstat (limited to 'script')
-rw-r--r-- | script/scons | 14 | ||||
-rw-r--r-- | script/scons-time | 49 | ||||
-rw-r--r-- | script/scons.bat | 6 | ||||
-rw-r--r-- | script/sconsign | 45 |
4 files changed, 51 insertions, 63 deletions
diff --git a/script/scons b/script/scons index e2f66bd..2cae192 100644 --- a/script/scons +++ b/script/scons @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001 - 2015 The SCons Foundation +# Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,15 +23,15 @@ # 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 rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/scons.py rel_2.5.0:3544:95d356f188a3 2016/04/09 14:38:50 bdbaddog" -__version__ = "2.4.1" +__version__ = "2.5.0" -__build__ = "rel_2.4.1:3453:73fefd3ea0b0" +__build__ = "rel_2.5.0:3544:95d356f188a3[MODIFIED]" __buildsys__ = "ubuntu1404-32bit" -__date__ = "2015/11/09 03:25:05" +__date__ = "2016/04/09 14:38:50" __developer__ = "bdbaddog" @@ -188,8 +188,8 @@ sys.path = libs + sys.path if __name__ == "__main__": try: import SCons.Script - except: - print("Import failed. Unable to find SCons files in:") + except ImportError: + print("SCons import failed. Unable to find engine files in:") for path in libs: print(" %s" % path) raise diff --git a/script/scons-time b/script/scons-time index 054e73e..2e63ef2 100644 --- a/script/scons-time +++ b/script/scons-time @@ -9,7 +9,7 @@ # # -# Copyright (c) 2001 - 2015 The SCons Foundation +# Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ from __future__ import division from __future__ import nested_scopes -__revision__ = "src/script/scons-time.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/scons-time.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import getopt import glob @@ -43,53 +43,10 @@ import sys import tempfile import time -try: - sorted -except NameError: - # Pre-2.4 Python has no sorted() function. - # - # The pre-2.4 Python list.sort() method does not support - # list.sort(key=) nor list.sort(reverse=) keyword arguments, so - # we must implement the functionality of those keyword arguments - # by hand instead of passing them to list.sort(). - def sorted(iterable, cmp=None, key=None, reverse=False): - if key is not None: - result = [(key(x), x) for x in iterable] - else: - result = iterable[:] - if cmp is None: - # Pre-2.3 Python does not support list.sort(None). - result.sort() - else: - result.sort(cmp) - if key is not None: - result = [t1 for t0,t1 in result] - if reverse: - result.reverse() - return result - -if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is not None: - # We can't apply the 'callable' fixer until the floor is 2.6, but the - # '-3' option to Python 2.6 and 2.7 generates almost ten thousand - # warnings. This hack allows us to run regression tests with the '-3' - # option by replacing the callable() built-in function with a hack - # that performs the same function but doesn't generate the warning. - # Note that this hack is ONLY intended to be used for regression - # testing, and should NEVER be used for real runs. - from types import ClassType - def callable(obj): - if hasattr(obj, '__call__'): return True - if isinstance(obj, (ClassType, type)): return True - return False - def make_temp_file(**kw): try: result = tempfile.mktemp(**kw) - try: - result = os.path.realpath(result) - except AttributeError: - # Python 2.1 has no os.path.realpath() method. - pass + result = os.path.realpath(result) except TypeError: try: save_template = tempfile.template diff --git a/script/scons.bat b/script/scons.bat index 563ab59..01acf5d 100644 --- a/script/scons.bat +++ b/script/scons.bat @@ -1,11 +1,11 @@ -@REM Copyright (c) 2001 - 2015 The SCons Foundation
-@REM src/script/scons.bat rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog
+@REM Copyright (c) 2001 - 2016 The SCons Foundation
+@REM src/script/scons.bat rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog
@echo off
set SCONS_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT
@REM for 9x/Me you better not have more than 9 args
-python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.4.1'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.4.1'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
+python -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, 'Lib', 'site-packages', 'scons-2.5.0'), join(sys.prefix, 'Lib', 'site-packages', 'scons'), join(sys.prefix, 'scons-2.5.0'), join(sys.prefix, 'scons')] + sys.path; import SCons.Script; SCons.Script.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM no way to set exit status of this script for 9x/Me
goto endscons
diff --git a/script/sconsign b/script/sconsign index 775f23b..38a217a 100644 --- a/script/sconsign +++ b/script/sconsign @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001 - 2015 The SCons Foundation +# Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,15 +23,15 @@ # 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/sconsign.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/sconsign.py rel_2.5.0:3544:95d356f188a3 2016/04/09 14:38:50 bdbaddog" -__version__ = "2.4.1" +__version__ = "2.5.0" -__build__ = "rel_2.4.1:3453:73fefd3ea0b0" +__build__ = "rel_2.5.0:3544:95d356f188a3[MODIFIED]" __buildsys__ = "ubuntu1404-32bit" -__date__ = "2015/11/09 03:25:05" +__date__ = "2016/04/09 14:38:50" __developer__ = "bdbaddog" @@ -54,6 +54,14 @@ import sys # followed by generic) so we pick up the right version of the build # engine modules if they're in either directory. + +if sys.version_info >= (3,0,0): + msg = "sconsign: *** Version %s does not run under Python version %s.\n\ +Python 3 is not yet supported.\n" + sys.stderr.write(msg % (__version__, sys.version.split()[0])) + sys.exit(1) + + script_dir = sys.path[0] if script_dir in sys.path: @@ -64,6 +72,11 @@ libs = [] if "SCONS_LIB_DIR" in os.environ: libs.append(os.environ["SCONS_LIB_DIR"]) +# - running from source takes priority (since 2.3.2), excluding SCONS_LIB_DIR settings +script_path = os.path.abspath(os.path.dirname(__file__)) +source_path = os.path.join(script_path, '..', 'engine') +libs.append(source_path) + local_version = 'scons-local-' + __version__ local = 'scons-local' if script_dir: @@ -463,12 +476,22 @@ for o, a in opts: elif o in ('-e', '--entry'): Print_Entries.append(a) elif o in ('-f', '--format'): + # Try to map the given DB format to a known module + # name, that we can then try to import... Module_Map = {'dblite' : 'SCons.dblite', 'sconsign' : None} dbm_name = Module_Map.get(a, a) if dbm_name: try: - dbm = my_import(dbm_name) + if dbm_name != "SCons.dblite": + dbm = my_import(dbm_name) + else: + import SCons.dblite + dbm = SCons.dblite + # Ensure that we don't ignore corrupt DB files, + # this was handled by calling my_import('SCons.dblite') + # again in earlier versions... + SCons.dblite.ignore_corrupt_dbfiles = 0 except: sys.stderr.write("sconsign: illegal file format `%s'\n" % a) print helpstr @@ -500,7 +523,15 @@ else: dbm_name = whichdb.whichdb(a) if dbm_name: Map_Module = {'SCons.dblite' : 'dblite'} - dbm = my_import(dbm_name) + if dbm_name != "SCons.dblite": + dbm = my_import(dbm_name) + else: + import SCons.dblite + dbm = SCons.dblite + # Ensure that we don't ignore corrupt DB files, + # this was handled by calling my_import('SCons.dblite') + # again in earlier versions... + SCons.dblite.ignore_corrupt_dbfiles = 0 Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a) else: Do_SConsignDir(a) |