mirror of
https://github.com/fedora-python/tox-current-env.git
synced 2025-11-11 21:35:37 +01:00
Only use old virtualenv with old tox
Fixes https://github.com/fedora-python/tox-current-env/issues/74
This commit is contained in:
@@ -83,11 +83,17 @@ def is_available(python):
|
||||
return True
|
||||
|
||||
|
||||
@functools.lru_cache()
|
||||
def drop_unsupported_pythons(envlist):
|
||||
return envlist[len("py36,py37,"):] if TOX4 else envlist
|
||||
|
||||
|
||||
@functools.lru_cache()
|
||||
def envs_from_tox_ini():
|
||||
cp = ConfigParser()
|
||||
cp.read(FIXTURES_DIR / "tox.ini")
|
||||
return cp["tox"]["envlist"].split(",")
|
||||
envlist = drop_unsupported_pythons(cp["tox"]["envlist"])
|
||||
return envlist.split(",")
|
||||
|
||||
|
||||
def tox_footer(envs=None, spaces=8):
|
||||
|
||||
Reference in New Issue
Block a user