summaryrefslogtreecommitdiff
path: root/engine/SCons/Defaults.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-08-11 12:17:57 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-08-11 12:17:57 +0200
commitc8ea3b672655ddab746a7aea5a50217057b02b9e (patch)
tree01a0e712f4cf32c7140cf1a4ae14db4da4202253 /engine/SCons/Defaults.py
parentca7be46fc0013fc037a045b6d4df73776461e821 (diff)
parentf6c9bffb15e04ea412db4df22a3851448221b85a (diff)
Diffstat (limited to 'engine/SCons/Defaults.py')
-rw-r--r--engine/SCons/Defaults.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/engine/SCons/Defaults.py b/engine/SCons/Defaults.py
index 9d135ed..63ba450 100644
--- a/engine/SCons/Defaults.py
+++ b/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 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
+__revision__ = "src/engine/SCons/Defaults.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 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'),