Can't do substitution {[base]commands}

Issue #175 on hold
Marc Abramowitz created an issue

I can't seem to do a substitution with "commands" in tox — e.g.:

[wheel]
deps = wheel
commands = pip wheel -i http://packages/index .

[testenv:wheelpy26]
deps = {[wheel]deps}
commands = {[wheel]commands}

results in:

ERROR: InvocationError: could not find executable 'pip wheel -i http://packages/index .'

It would be nice if it were possible to reuse commands.

Comments (7)

  1. Martin Scherer

    If multiple commands are given like this

    [base]
    my_cmds = cmd1 arg1 foo;
                       cmd2 bar;
    

    and referenced under an testenv

    [testenv:test]
    commands = special_arg
                         {[base]|my_cmds}
    

    then all lines of my_cmds are handled as one command line. This is somehow expected. But it would be a really nice improvement to handle each line as its own command, since this pattern would avoid to repeat ourselves.

  2. Log in to comment