summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernát Gábor <bgabor8@bloomberg.net>2019-07-01 18:00:18 +0100
committerGitHub <noreply@github.com>2019-07-01 18:00:18 +0100
commite2ae954a89d21ba0916e82c1d983b8f00257324b (patch)
tree75261f6ee85e3703b5539119da2c56b4c57d04ef /src
parent2d2b2aed942937fa11b2e9df191c2542fdcbf89a (diff)
downloadtox-git-e2ae954a89d21ba0916e82c1d983b8f00257324b.tar.gz
fix non-canonical names don't work with provisioning (#1360)
Diffstat (limited to 'src')
-rw-r--r--src/tox/config/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tox/config/__init__.py b/src/tox/config/__init__.py
index c7229637..c1a3239e 100644
--- a/src/tox/config/__init__.py
+++ b/src/tox/config/__init__.py
@@ -1027,7 +1027,7 @@ class ParseIni(object):
config.setupdir = reader.getpath("setupdir", "{toxinidir}")
config.logdir = config.toxworkdir.join("log")
within_parallel = PARALLEL_ENV_VAR_KEY in os.environ
- if not within_parallel:
+ if not within_parallel and not WITHIN_PROVISION:
ensure_empty_dir(config.logdir)
# determine indexserver dictionary
@@ -1165,7 +1165,7 @@ class ParseIni(object):
if package_name not in exists:
deps.append(DepConfig(require, None))
exists.add(package_name)
- dist = importlib_metadata.distribution(package_name)
+ dist = importlib_metadata.distribution(package.name)
if not package.specifier.contains(dist.version, prereleases=True):
raise MissingDependency(package)
except requirements.InvalidRequirement as exception:
@@ -1176,6 +1176,9 @@ class ParseIni(object):
missing_requirements.append(str(requirements.Requirement(require)))
if failed_to_parse:
raise tox.exception.BadRequirement()
+ if WITHIN_PROVISION and missing_requirements:
+ msg = "break infinite loop provisioning within {} missing {}"
+ raise tox.exception.Error(msg.format(sys.executable, missing_requirements))
config.run_provision = bool(len(missing_requirements))
return deps