Skip to content
Snippets Groups Projects
Unverified Commit c6e75c9f authored by Richard van der Hoff's avatar Richard van der Hoff Committed by GitHub
Browse files

Merge pull request #4450 from 14mRh4X0r/fix-dependency-message

Fix error message for optional dependencies
parents c1dfd6a1 d528406c
No related branches found
No related tags found
No related merge requests found
The dependency checker now correctly reports a version mismatch for optional
dependencies, instead of reporting the dependency missing.
......@@ -143,9 +143,12 @@ def check_requirements(for_feature=None, _get_distribution=get_distribution):
for dependency in OPTS:
try:
_get_distribution(dependency)
except VersionConflict:
except VersionConflict as e:
deps_needed.append(dependency)
errors.append("Needed %s but it was not installed" % (dependency,))
errors.append(
"Needed optional %s, got %s==%s"
% (dependency, e.dist.project_name, e.dist.version)
)
except DistributionNotFound:
# If it's not found, we don't care
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment