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

Support backticks within deps #5

Open jayvdb opened 5 years ago

jayvdb commented 5 years ago

It should be straight forward to add backticks within deps, and doesnt present any conflict with existing syntax as backticks are invalid requirements.txt syntax.

jayvdb commented 4 years ago

So this works in at least tox 3.8+

[testenv:deps]
setenv =
  DEPS=distro
deps =
  {env:DEPS}
commands =
  distro --help

However if setenv of DEPS uses backticks, installdeps fails because it occurs before the backticks handling which is done later in the hook tox_runtest_pre.

So a bit of re-structure is needed to use hook tox_testenv_install_deps to perform the backtick handling sooner. Using the earlier hook tox_testenv_create might also be possible. Removing the backticks asap is very likely to be better for interoperability with other tox plugins.