diff options
Diffstat (limited to 'engine/SCons/Script/__init__.py')
-rw-r--r-- | engine/SCons/Script/__init__.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/engine/SCons/Script/__init__.py b/engine/SCons/Script/__init__.py index ea9d4fa..ffafadf 100644 --- a/engine/SCons/Script/__init__.py +++ b/engine/SCons/Script/__init__.py @@ -12,7 +12,7 @@ it goes here. """ # -# Copyright (c) 2001 - 2016 The SCons Foundation +# Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -34,14 +34,19 @@ it goes here. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/__init__.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Script/__init__.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import time start_time = time.time() import collections import os -import StringIO + +try: + from StringIO import StringIO +except ImportError: + from io import StringIO + import sys # Special chicken-and-egg handling of the "--debug=memoizer" flag: @@ -67,7 +72,7 @@ if "--debug=memoizer" in _args: except SCons.Warnings.Warning: # Some warning was thrown. Arrange for it to be displayed # or not after warnings are configured. - import Main + from . import Main exc_type, exc_value, tb = sys.exc_info() Main.delayed_warnings.append((exc_type, exc_value)) del _args @@ -86,7 +91,7 @@ import SCons.Util import SCons.Variables import SCons.Defaults -import Main +from . import Main main = Main.main @@ -130,7 +135,7 @@ GetBuildFailures = Main.GetBuildFailures #repositories = Main.repositories # -import SConscript +from . import SConscript _SConscript = SConscript call_stack = _SConscript.call_stack @@ -264,7 +269,7 @@ def HelpFunction(text, append=False): global help_text if help_text is None: if append: - s = StringIO.StringIO() + s = StringIO() PrintHelp(s) help_text = s.getvalue() s.close() @@ -332,6 +337,7 @@ GlobalDefaultEnvironmentFunctions = [ 'Local', 'ParseDepends', 'Precious', + 'PyPackageDir', 'Repository', 'Requires', 'SConsignFile', @@ -354,6 +360,7 @@ GlobalDefaultBuilders = [ 'Java', 'JavaH', 'Library', + 'LoadableModule', 'M4', 'MSVSProject', 'Object', @@ -374,7 +381,7 @@ GlobalDefaultBuilders = [ ] for name in GlobalDefaultEnvironmentFunctions + GlobalDefaultBuilders: - exec "%s = _SConscript.DefaultEnvironmentCall(%s)" % (name, repr(name)) + exec ("%s = _SConscript.DefaultEnvironmentCall(%s)" % (name, repr(name))) del name # There are a handful of variables that used to live in the |