From baee03c569c91b745a1e025660b19a718db16e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Thu, 28 Sep 2017 12:18:58 +0200 Subject: New upstream version 3.0.0 --- src/engine/SCons/Platform/PlatformTests.py | 4 +- src/engine/SCons/Platform/__init__.py | 25 ++++--- src/engine/SCons/Platform/__init__.xml | 2 +- src/engine/SCons/Platform/aix.py | 6 +- src/engine/SCons/Platform/cygwin.py | 6 +- src/engine/SCons/Platform/darwin.py | 10 ++- src/engine/SCons/Platform/hpux.py | 6 +- src/engine/SCons/Platform/irix.py | 6 +- src/engine/SCons/Platform/os2.py | 6 +- src/engine/SCons/Platform/posix.py | 6 +- src/engine/SCons/Platform/posix.xml | 2 +- src/engine/SCons/Platform/sunos.py | 6 +- src/engine/SCons/Platform/sunos.xml | 2 +- src/engine/SCons/Platform/win32.py | 113 ++++++++++++++++++++++------- src/engine/SCons/Platform/win32.xml | 2 +- 15 files changed, 133 insertions(+), 69 deletions(-) (limited to 'src/engine/SCons/Platform') diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py index d704cf8..686d0d2 100644 --- a/src/engine/SCons/Platform/PlatformTests.py +++ b/src/engine/SCons/Platform/PlatformTests.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/PlatformTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Platform/PlatformTests.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import SCons.compat diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index c95f291..61a4010 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -20,8 +20,8 @@ their own platform definition. """ # -# 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 # "Software"), to deal in the Software without restriction, including @@ -41,8 +41,9 @@ their own platform definition. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +from __future__ import print_function -__revision__ = "src/engine/SCons/Platform/__init__.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Platform/__init__.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import SCons.compat @@ -55,6 +56,7 @@ import SCons.Errors import SCons.Subst import SCons.Tool + def platform_default(): """Return the platform string for our execution environment. @@ -130,7 +132,7 @@ class PlatformSpec(object): def __str__(self): return self.name - + class TempFileMunge(object): """A callable class. You can set an Environment variable to this, then call it with a string argument, then it will perform temporary @@ -183,9 +185,9 @@ class TempFileMunge(object): node = target[0] if SCons.Util.is_List(target) else target cmdlist = getattr(node.attributes, 'tempfile_cmdlist', None) \ if node is not None else None - if cmdlist is not None : + if cmdlist is not None : return cmdlist - + # We do a normpath because mktemp() has what appears to be # a bug in Windows that will use a forward slash as a path # delimiter. Windows's link mistakes that for a command line @@ -215,7 +217,7 @@ class TempFileMunge(object): prefix = '@' args = list(map(SCons.Subst.quote_spaces, cmd[1:])) - os.write(fd, " ".join(args) + "\n") + os.write(fd, bytearray(" ".join(args) + "\n",'utf-8')) os.close(fd) # XXX Using the SCons.Action.print_actions value directly # like this is bogus, but expedient. This class should @@ -233,14 +235,14 @@ class TempFileMunge(object): # purity get in the way of just being helpful, so we'll # reach into SCons.Action directly. if SCons.Action.print_actions: - cmdstr = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, + cmdstr = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, source) if self.cmdstr is not None else '' # Print our message only if XXXCOMSTR returns an empty string if len(cmdstr) == 0 : print("Using tempfile "+native_tmp+" for command line:\n"+ str(cmd[0]) + " " + " ".join(args)) - - # Store the temporary file command list into the target Node.attributes + + # Store the temporary file command list into the target Node.attributes # to avoid creating two temporary files one for print and one for execute. cmdlist = [ cmd[0], prefix + native_tmp + '\n' + rm, native_tmp ] if node is not None: @@ -249,7 +251,8 @@ class TempFileMunge(object): except AttributeError: pass return cmdlist - + + def Platform(name = platform_default()): """Select a canned Platform specification. """ diff --git a/src/engine/SCons/Platform/__init__.xml b/src/engine/SCons/Platform/__init__.xml index 35e56a7..cb83a9f 100644 --- a/src/engine/SCons/Platform/__init__.xml +++ b/src/engine/SCons/Platform/__init__.xml @@ -1,6 +1,6 @@