mirror of
https://github.com/fedora-python/tox-current-env.git
synced 2025-01-11 08:56:14 +01:00
Make tox_dependencies() a generator
This commit is contained in:
parent
beda06ad5e
commit
2cbcf96a70
@ -199,11 +199,10 @@ def tox_testenv_install_deps(venv, action):
|
|||||||
|
|
||||||
def tox_dependencies(config):
|
def tox_dependencies(config):
|
||||||
"""Get dependencies of tox itself, 'minversion' and 'requires' config options"""
|
"""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:
|
if config.minversion is not None:
|
||||||
deps.insert(0, f"tox >= {config.minversion}")
|
yield f"tox >= {config.minversion}"
|
||||||
return deps
|
# config does not have the "requires" attribute until tox 3.22:
|
||||||
|
yield from getattr(config, "requires", [])
|
||||||
|
|
||||||
|
|
||||||
@tox.hookimpl
|
@tox.hookimpl
|
||||||
|
Loading…
Reference in New Issue
Block a user