Add support for capturing strings from factor variants (eg versions of deps)

Issue #333 on hold
Ed Morley created an issue

For projects that use tox to test against multiple versions of deps, it's common to see this type of version repetition in deps:

envlist =

deps =
    pip062: pip==0.6.2
    pip063: pip==0.6.3
    pip070: pip==0.7.0
    # ...
    pip811: pip==8.1.1
    pip812: pip==8.1.2

It would be great if instead the version component of the factor could be captured (almost regex group style) and re-used as part of the pip install command. ie:

envlist =

deps =
    pip{*}: pip=={0}

Where {0} denotes the first group matched on the left (though I'm fine with just allowing only one match per line if that's easier).

This would also require supporting periods in the envlist strings, since tox currently strips out the non-alphanumeric characters (in the example above, tox -l lists py26-pip062 rather than the expected py26-pip0.6.2).

Apologies if this is filed already (or in fact possible with the current syntax), I've read the docs and search the tracker, but it's hard to know what search terms to use.

Comments (3)

  1. Log in to comment