diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-28 14:18:55 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-28 14:18:55 +0100 |
commit | 6298ea00640a74af4eecbf3528ea87bd191a2eba (patch) | |
tree | 6f9badf5b8f69055849260093eb76ce184e746ef /engine/SCons/Script/SConscript.py | |
parent | 0809a628a8aa042fe6bb225d4d70e63f289eaafb (diff) | |
parent | 5d14e9e6b9aa6c884d8a4787cd248c9ab3612962 (diff) |
Konflikte behobendebian/3.1.2-1
Diffstat (limited to 'engine/SCons/Script/SConscript.py')
-rw-r--r-- | engine/SCons/Script/SConscript.py | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py index c0a75f2..97073ba 100644 --- a/engine/SCons/Script/SConscript.py +++ b/engine/SCons/Script/SConscript.py @@ -27,7 +27,7 @@ files. # 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/Script/SConscript.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan" +__revision__ = "src/engine/SCons/Script/SConscript.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan" import SCons import SCons.Action @@ -42,7 +42,7 @@ import SCons.Platform import SCons.SConf import SCons.Script.Main import SCons.Tool -import SCons.Util +from SCons.Util import is_List, is_String, is_Dict, flatten from . import Main @@ -98,7 +98,7 @@ def compute_exports(exports): retval = {} try: for export in exports: - if SCons.Util.is_Dict(export): + if is_Dict(export): retval.update(export) else: try: @@ -133,7 +133,7 @@ call_stack = [] def Return(*vars, **kw): retval = [] try: - fvars = SCons.Util.flatten(vars) + fvars = flatten(vars) for var in fvars: for v in var.split(): retval.append(call_stack[-1].globals[v]) @@ -420,7 +420,7 @@ class SConsEnvironment(SCons.Environment.Base): except KeyError: raise SCons.Errors.UserError("Invalid SConscript usage - no parameters") - if not SCons.Util.is_List(dirs): + if not is_List(dirs): dirs = [ dirs ] dirs = list(map(str, dirs)) @@ -441,13 +441,13 @@ class SConsEnvironment(SCons.Environment.Base): raise SCons.Errors.UserError("Invalid SConscript() usage - too many arguments") - if not SCons.Util.is_List(files): + if not is_List(files): files = [ files ] if kw.get('exports'): exports.extend(self.Split(kw['exports'])) - variant_dir = kw.get('variant_dir') or kw.get('build_dir') + variant_dir = kw.get('variant_dir') if variant_dir: if len(files) != 1: raise SCons.Errors.UserError("Invalid SConscript() usage - can only specify one SConscript with a variant_dir") @@ -577,9 +577,6 @@ class SConsEnvironment(SCons.Environment.Base): UserError: a script is not found and such exceptions are enabled. """ - if 'build_dir' in kw: - msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead.""" - SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg) def subst_element(x, subst=self.subst): if SCons.Util.is_List(x): x = list(map(subst, x)) @@ -589,15 +586,10 @@ class SConsEnvironment(SCons.Environment.Base): ls = list(map(subst_element, ls)) subst_kw = {} for key, val in kw.items(): - if SCons.Util.is_String(val): + if is_String(val): val = self.subst(val) elif SCons.Util.is_List(val): - result = [] - for v in val: - if SCons.Util.is_String(v): - v = self.subst(v) - result.append(v) - val = result + val = [self.subst(v) if is_String(v) else v for v in val] subst_kw[key] = val files, exports = self._get_SConscript_filenames(ls, subst_kw) |