aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo Zimmermann2020-02-02 09:21:34 +0100
committerThéo Zimmermann2020-02-02 09:21:34 +0100
commit4a4e300a8db1907ec94686e22a84078b39fc6f8a (patch)
treec2de91fda271cd32162ca3ef2c51b84fbc86bc73
parent869f731439b7fe034067bb550b60713b9b790f5b (diff)
parente75297e84e9e807c895be221b26d43fffc748b12 (diff)
Merge PR #11466: checkdeps.py: add missing dep & report deps all at once
Reviewed-by: Zimmi48
-rw-r--r--doc/tools/coqrst/checkdeps.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/doc/tools/coqrst/checkdeps.py b/doc/tools/coqrst/checkdeps.py
index 91f0a7cb1b..feafcba026 100644
--- a/doc/tools/coqrst/checkdeps.py
+++ b/doc/tools/coqrst/checkdeps.py
@@ -10,13 +10,20 @@
from __future__ import print_function
import sys
+missing_deps = []
+
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def missing_dep(dep):
- eprint('Cannot find %s (needed to build documentation)' % dep)
- eprint('You can run `pip3 install %s` to install it.' % dep)
- sys.exit(1)
+ missing_deps.append(dep)
+
+def report_missing_deps():
+ if len(missing_deps) > 0:
+ deps = " ".join(missing_deps)
+ eprint('Cannot find package(s) `%s` (needed to build documentation)' % deps)
+ eprint('You can run `pip3 install %s` to install it/them.' % deps)
+ sys.exit(1)
try:
import sphinx_rtd_theme
@@ -37,3 +44,10 @@ try:
import bs4
except:
missing_dep('beautifulsoup4')
+
+try:
+ import sphinxcontrib.bibtex
+except:
+ missing_dep('sphinxcontrib-bibtex')
+
+report_missing_deps()