summaryrefslogtreecommitdiff
path: root/engine/SCons/Environment.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-12 17:48:16 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-12 17:48:16 +0200
commit5691a6c506a798b49164d132608bc9d747b92180 (patch)
tree85704636c71371f118ef03370a4f5cda428f0b40 /engine/SCons/Environment.py
parent2fb368b8751637ffa010e5e4f79e2dda6adc6038 (diff)
parent19712e5025e3cf6a33fccd0738f04e018d55025f (diff)
Update upstream source from tag 'upstream/3.0.5'
Update to upstream version '3.0.5' with Debian dir 17ecf804eb411d18bf841acaaf9a2dab2b55f14d
Diffstat (limited to 'engine/SCons/Environment.py')
-rw-r--r--engine/SCons/Environment.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/engine/SCons/Environment.py b/engine/SCons/Environment.py
index 0ff6c79..0fcd617 100644
--- a/engine/SCons/Environment.py
+++ b/engine/SCons/Environment.py
@@ -10,7 +10,7 @@ Environment
"""
#
-# 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
@@ -31,7 +31,7 @@ Environment
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Environment.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
+__revision__ = "src/engine/SCons/Environment.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan"
import copy
@@ -150,7 +150,7 @@ def _set_BUILDERS(env, key, value):
for k in list(bd.keys()):
del bd[k]
except KeyError:
- bd = BuilderDict(kwbd, env)
+ bd = BuilderDict(bd, env)
env._dict[key] = bd
for k, v in value.items():
if not SCons.Builder.is_a_Builder(v):
@@ -1217,7 +1217,7 @@ class Base(SubstitutionEnvironment):
return path
def AppendENVPath(self, name, newpath, envname = 'ENV',
- sep = os.pathsep, delete_existing=1):
+ sep = os.pathsep, delete_existing=0):
"""Append path elements to the path 'name' in the 'ENV'
dictionary for this environment. Will only add any particular
path once, and will normpath and normcase all paths to help
@@ -1568,12 +1568,12 @@ class Base(SubstitutionEnvironment):
"""
filename = self.subst(filename)
try:
- fp = open(filename, 'r')
+ with open(filename, 'r') as fp:
+ lines = SCons.Util.LogicalLines(fp).readlines()
except IOError:
if must_exist:
raise
return
- lines = SCons.Util.LogicalLines(fp).readlines()
lines = [l for l in lines if l[0] != '#']
tdlist = []
for line in lines:
@@ -2258,7 +2258,7 @@ class Base(SubstitutionEnvironment):
while (node != node.srcnode()):
node = node.srcnode()
return node
- sources = list(map( final_source, sources ));
+ sources = list(map(final_source, sources))
# remove duplicates
return list(set(sources))
@@ -2372,6 +2372,7 @@ class OverrideEnvironment(Base):
kw = copy_non_reserved_keywords(kw)
self.__dict__['overrides'].update(semi_deepcopy(kw))
+
# The entry point that will be used by the external world
# to refer to a construction environment. This allows the wrapper
# interface to extend a construction environment for its own purposes