jayvdb / tox-backticks

tox-backticks allows use of backticks within setenv to run commands to populate environment variables that can then be accessed using {env:var}
https://pypi.org/project/tox-backticks/
MIT License
5 stars 3 forks source link

Skip backticks not needed by commands #9

Open jayvdb opened 5 years ago

jayvdb commented 5 years ago

If a backtick isnt used by any commands for a testenv, it doesnt need to be evaluated, unless the purpose was to set the envvar for one of the command to read.

There could be a flag which separates envvars needed within the tox.ini vs envvars needed to be passed to the commands.

Potentially filter the list to be passed to the commands could be a separate tox plugin, which this plugin could detect and then it knows which envvars it can eliminate.

jayvdb commented 5 years ago

A way to add support for defining which envvars are needed inside commands is for setenv _FOO= to be considered private to tox , not needed by the commands.

There are very few _ envvars that are used by commands, and they would not be supported by backticks. A non-breaking change later can replace that with a better mechanism if required.