summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Script/SConscript.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
-rw-r--r--src/engine/SCons/Script/SConscript.py26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index c0a75f2..97073ba 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/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)