1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2025-11-23 18:58:58 +01:00

Print tox requires with --print-deps-to

Partially fixes https://github.com/fedora-python/tox-current-env/issues/39
This commit is contained in:
Miro Hrončok
2021-02-15 22:54:55 +01:00
parent a66b6f73d3
commit e7456d9645
2 changed files with 51 additions and 3 deletions

View File

@@ -198,10 +198,11 @@ def tox_testenv_install_deps(venv, action):
def tox_dependencies(config):
"""Get dependencies of tox itself, 'minversion' config option"""
deps = []
"""Get dependencies of tox itself, 'minversion' and 'requires' config options"""
# config does not have this attribute until tox 3.22:
deps = getattr(config, "requires", [])
if config.minversion is not None:
deps.append(f"tox >= {config.minversion}")
deps.insert(0, f"tox >= {config.minversion}")
return deps