summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Defaults.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Defaults.py')
-rw-r--r--src/engine/SCons/Defaults.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index 4a18045..30c0052 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -10,7 +10,7 @@ from distutils.msvccompiler.
"""
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ from distutils.msvccompiler.
#
from __future__ import division
-__revision__ = "src/engine/SCons/Defaults.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Defaults.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan"
import os
@@ -193,7 +193,7 @@ def chmod_func(dest, mode):
SCons.Node.FS.invalidate_node_memos(dest)
if not SCons.Util.is_List(dest):
dest = [dest]
- if SCons.Util.is_String(mode) and not 0 in [i in digits for i in mode]:
+ if SCons.Util.is_String(mode) and 0 not in [i in digits for i in mode]:
mode = int(mode, 8)
if not SCons.Util.is_String(mode):
for element in dest:
@@ -210,7 +210,7 @@ def chmod_func(dest, mode):
else:
raise SyntaxError("Could not find +, - or =")
operation_list = operation.split(operator)
- if len(operation_list) is not 2:
+ if len(operation_list) != 2:
raise SyntaxError("More than one operator found")
user = operation_list[0].strip().replace("a", "ugo")
permission = operation_list[1].strip()
@@ -333,8 +333,8 @@ def touch_func(dest):
if os.path.exists(file):
atime = os.path.getatime(file)
else:
- open(file, 'w')
- atime = mtime
+ with open(file, 'w'):
+ atime = mtime
os.utime(file, (atime, mtime))
Touch = ActionFactory(touch_func,
@@ -342,6 +342,7 @@ Touch = ActionFactory(touch_func,
# Internal utility functions
+
def _concat(prefix, list, suffix, env, f=lambda x: x, target=None, source=None):
"""
Creates a new list from 'list' by first interpolating each element
@@ -358,6 +359,7 @@ def _concat(prefix, list, suffix, env, f=lambda x: x, target=None, source=None):
return _concat_ixes(prefix, list, suffix, env)
+
def _concat_ixes(prefix, list, suffix, env):
"""
Creates a new list from 'list' by concatenating the 'prefix' and
@@ -395,6 +397,7 @@ def _concat_ixes(prefix, list, suffix, env):
return result
+
def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
"""
This is a wrapper around _concat()/_concat_ixes() that checks for
@@ -565,7 +568,6 @@ ConstructionEnvironment = {
'DSUFFIXES' : SCons.Tool.DSuffixes,
'ENV' : {},
'IDLSUFFIXES' : SCons.Tool.IDLSuffixes,
-# 'LATEXSUFFIXES' : SCons.Tool.LaTeXSuffixes, # moved to the TeX tools generate functions
'_concat' : _concat,
'_defines' : _defines,
'_stripixes' : _stripixes,
@@ -580,6 +582,7 @@ ConstructionEnvironment = {
'__DSHLIBVERSIONFLAGS' : '${__libversionflags(__env__,"DSHLIBVERSION","_DSHLIBVERSIONFLAGS")}',
'TEMPFILE' : NullCmdGenerator,
+ 'TEMPFILEARGJOIN': ' ',
'Dir' : Variable_Method_Caller('TARGET', 'Dir'),
'Dirs' : Variable_Method_Caller('TARGET', 'Dirs'),
'File' : Variable_Method_Caller('TARGET', 'File'),