How can I get tox to automatically recreate its virtualenvs with the new dependencies whenever I make a change to my package's setup.cfg file?
Normally a Python package would list its dependencies using the setuptools install_requires setting in its setup.cfg:
[options]
install_requires =
google-auth-oauthlib
PyJWT
pyramid>=2.0.0
Then if using tox you'd list your test dependencies using the deps setting in tox.ini:
[testenv]
deps =
pytest
pytest-cov >= 3.5
If you make a change to the deps in tox.ini then the next time you run tox it'll notice the change and will recreate the virtualenv installing the new deps.
But if you make a change to the dependencies in the setup.cfg file tox will not notice this and won't recreate the virtualenv. You have to manually run tox --recreate to force recreation. Is there any way to get tox to automatically recreate the virtualenv when setup.cfg changes?