summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2014-05-20 17:28:50 (GMT)
committerDirk Baechle <dl9obn@darc.de>2014-05-20 17:28:50 (GMT)
commitc36de026dc80becfe5abbfa617203b17ab3c0c7a (patch)
tree413c0e40e173b1f01a4d50423a8acc8cc8a55d79
parentbebd12923cbb9632875c8a6367efb23a74f9c1f8 (diff)
downloadSCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.zip
SCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.tar.gz
SCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.tar.bz2
- allow varlist to be specified as list of strings, fixes issue #2754
-rw-r--r--src/CHANGES.txt1
-rw-r--r--src/engine/SCons/Action.py2
-rw-r--r--src/engine/SCons/ActionTests.py3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 20c9872..dca9901 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -47,6 +47,7 @@ RELEASE 2.3.2.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
From Dirk Baechle:
- Update XML doc editor configuration
+ - Fix: Allow varlist to be specified as list of strings for Actions (#2754)
From Rob Managan:
- Updated the TeX builder to support use of the -synctex=1
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py
index 16866b6..1c746be 100644
--- a/src/engine/SCons/Action.py
+++ b/src/engine/SCons/Action.py
@@ -337,7 +337,7 @@ def _do_create_keywords(args, kw):
'You must either pass a string or a callback which '
'accepts (target, source, env) as parameters.')
if len(args) > 1:
- kw['varlist'] = args[1:] + kw['varlist']
+ kw['varlist'] = tuple(SCons.Util.flatten(args[1:])) + kw['varlist']
if kw.get('strfunction', _null) is not _null \
and kw.get('cmdstr', _null) is not _null:
raise SCons.Errors.UserError(
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py
index 809e5ce..b46347d 100644
--- a/src/engine/SCons/ActionTests.py
+++ b/src/engine/SCons/ActionTests.py
@@ -211,6 +211,9 @@ def test_varlist(pos_call, str_call, cmd, cmdstrfunc, **kw):
a = call_action((cmd, cmdstrfunc, 'a', 'b', 'c'))
assert a.varlist == ('a', 'b', 'c'), a.varlist
+ a = call_action((cmd, cmdstrfunc, ['a', 'b', 'c']))
+ assert a.varlist == ('a', 'b', 'c'), a.varlist
+
kw['varlist'] = 'foo'
a = call_action((cmd, cmdstrfunc))
assert a.varlist == ('foo',), a.varlist