Check dependencies on setup in the nicer way. (#5989)

This commit is contained in:
Jorik Schellekens 2019-09-11 14:00:37 +01:00 committed by GitHub
parent 3505ffcda7
commit 6604b64fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 28 deletions

View file

@ -147,7 +147,13 @@ def check_requirements(for_feature=None):
)
except DistributionNotFound:
deps_needed.append(dependency)
errors.append("Needed %s but it was not installed" % (dependency,))
if for_feature:
errors.append(
"Needed %s for the '%s' feature but it was not installed"
% (dependency, for_feature)
)
else:
errors.append("Needed %s but it was not installed" % (dependency,))
if not for_feature:
# Check the optional dependencies are up to date. We allow them to not be