diff options
-rw-r--r-- | documentation/conf.py | 21 | ||||
-rw-r--r-- | documentation/poky.yaml | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/documentation/conf.py b/documentation/conf.py index 1efd63ca15..fe27e3e0d2 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -15,8 +15,27 @@ import os import sys import datetime +try: + import yaml +except ImportError: + sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\ + \nPlease make sure to install pyyaml python package.\n") + sys.exit(1) -current_version = "3.2.4" +# current_version = "dev" +# bitbake_version = "" # Leave empty for development branch +# Obtain versions from poky.yaml instead +with open("poky.yaml") as data: + buff = data.read() + subst_vars = yaml.safe_load(buff) + if "DOCCONF_VERSION" not in subst_vars: + sys.stderr.write("Please set DOCCONF_VERSION in poky.yaml") + sys.exit(1) + current_version = subst_vars["DOCCONF_VERSION"] + if "BITBAKE_SERIES" not in subst_vars: + sys.stderr.write("Please set BITBAKE_SERIES in poky.yaml") + sys.exit(1) + bitbake_version = subst_vars["BITBAKE_SERIES"] # String used in sidebar version = 'Version: ' + current_version diff --git a/documentation/poky.yaml b/documentation/poky.yaml index 189f7bec6c..fb567a11dc 100644 --- a/documentation/poky.yaml +++ b/documentation/poky.yaml @@ -5,6 +5,8 @@ DISTRO_NAME_NO_CAP_MINUS_ONE : "dunfell" YOCTO_DOC_VERSION : "3.2.4" YOCTO_DOC_VERSION_MINUS_ONE : "3.1.7" DISTRO_REL_TAG : "yocto-3.2.4" +DOCCONF_VERSION : "3.2.4" +BITBAKE_SERIES : "1.48" POKYVERSION : "24.0.4" YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;" YOCTO_DL_URL : "https://downloads.yoctoproject.org" |