summaryrefslogtreecommitdiffstats
path: root/documentation/sphinx/yocto-vars.py
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-09-18 10:14:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-22 09:58:50 +0100
commita69d74c842a0f55ffa1408fa058138ac9637a0c6 (patch)
tree627d569efd58720c2fe8478d7d624cb83d76db3d /documentation/sphinx/yocto-vars.py
parentd6ce950527981cf468f7091e5937333ad080e8b6 (diff)
downloadpoky-a69d74c842a0f55ffa1408fa058138ac9637a0c6.tar.gz
sphinx: report errors when dependencies are not met
To build the Sphinx documentation, we have the following dependencies: * sphinx * sphinx_rtd_theme * pyyaml If any of these dependencies are missing, we might end up with some cryptic error messages. This patch adds better error reporting when dependencies are not met. (From yocto-docs rev: 19df8d1ec56dc2ecb44122288cc53e84237fab69) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/sphinx/yocto-vars.py')
-rw-r--r--documentation/sphinx/yocto-vars.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/documentation/sphinx/yocto-vars.py b/documentation/sphinx/yocto-vars.py
index 5689472991..8083d7da19 100644
--- a/documentation/sphinx/yocto-vars.py
+++ b/documentation/sphinx/yocto-vars.py
@@ -1,10 +1,19 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2import re 2import re
3import yaml 3import sys
4 4
5import sphinx 5import sphinx
6from sphinx.application import Sphinx 6from sphinx.application import Sphinx
7 7
8# This extension uses pyyaml, report an explicit
9# error message if it's not installed
10try:
11 import yaml
12except ImportError:
13 sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\
14 \nPlease make sure to install pyyaml python package.\n")
15 sys.exit(1)
16
8__version__ = '1.0' 17__version__ = '1.0'
9 18
10# Variables substitutions. Uses {VAR} subst using variables defined in poky.yaml 19# Variables substitutions. Uses {VAR} subst using variables defined in poky.yaml