diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-06-04 01:01:40 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-06-04 01:01:40 (GMT) |
commit | 71e3005c91d4a7c42b96cc3a3bc95d9c4cbfa661 (patch) | |
tree | 68857d7d60d31a1a3113cb3473cc6221ba674546 | |
parent | 6520bd13cc6ca45092cb51564d1e088757e8b83e (diff) | |
parent | c36de026dc80becfe5abbfa617203b17ab3c0c7a (diff) | |
download | SCons-71e3005c91d4a7c42b96cc3a3bc95d9c4cbfa661.zip SCons-71e3005c91d4a7c42b96cc3a3bc95d9c4cbfa661.tar.gz SCons-71e3005c91d4a7c42b96cc3a3bc95d9c4cbfa661.tar.bz2 |
Merged in dirkbaechle/scons (pull request #143)
Allow varlist to be specified as list of strings for Actions
-rw-r--r-- | src/CHANGES.txt | 1 | ||||
-rw-r--r-- | src/engine/SCons/Action.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/ActionTests.py | 3 |
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 |