summaryrefslogtreecommitdiff
path: root/engine/SCons/Platform/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Platform/__init__.py')
-rw-r--r--engine/SCons/Platform/__init__.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/engine/SCons/Platform/__init__.py b/engine/SCons/Platform/__init__.py
index e1cc941..8da1e9d 100644
--- a/engine/SCons/Platform/__init__.py
+++ b/engine/SCons/Platform/__init__.py
@@ -43,11 +43,11 @@ their own platform definition.
#
from __future__ import print_function
-__revision__ = "src/engine/SCons/Platform/__init__.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan"
+__revision__ = "src/engine/SCons/Platform/__init__.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan"
import SCons.compat
-import imp
+import importlib
import os
import sys
import tempfile
@@ -101,13 +101,8 @@ def platform_module(name = platform_default()):
eval(full_name)
else:
try:
- file, path, desc = imp.find_module(name,
- sys.modules['SCons.Platform'].__path__)
- try:
- mod = imp.load_module(full_name, file, path, desc)
- finally:
- if file:
- file.close()
+ # the specific platform module is a relative import
+ mod = importlib.import_module("." + name, __name__)
except ImportError:
try:
import zipimport
@@ -231,8 +226,10 @@ class TempFileMunge(object):
prefix = '@'
args = list(map(SCons.Subst.quote_spaces, cmd[1:]))
- os.write(fd, bytearray(" ".join(args) + "\n",'utf-8'))
+ join_char = env.get('TEMPFILEARGJOIN',' ')
+ os.write(fd, bytearray(join_char.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
# really be rewritten as an Action that defines the