1# Configuration file for the Sphinx documentation builder. 2# 3# This file only contains a selection of the most common options. For a full 4# list see the documentation: 5# https://www.sphinx-doc.org/en/master/usage/configuration.html 6 7# -- Path setup -------------------------------------------------------------- 8 9# If extensions (or modules to document with autodoc) are in another directory, 10# add these directories to sys.path here. If the directory is relative to the 11# documentation root, use os.path.abspath to make it absolute, like shown here. 12# 13# import os 14# import sys 15# sys.path.insert(0, os.path.abspath('.')) 16 17import sys 18import datetime 19 20current_version = "dev" 21 22# String used in sidebar 23version = 'Version: ' + current_version 24if current_version == 'dev': 25 version = 'Version: Current Development' 26# Version seen in documentation_options.js and hence in js switchers code 27release = current_version 28 29# -- Project information ----------------------------------------------------- 30 31project = 'Bitbake' 32copyright = '2004-%s, Richard Purdie, Chris Larson, and Phil Blundell' \ 33 % datetime.datetime.now().year 34author = 'Richard Purdie, Chris Larson, and Phil Blundell' 35 36# external links and substitutions 37extlinks = { 38 'yocto_docs': ('https://docs.yoctoproject.org%s', None), 39 'oe_lists': ('https://lists.openembedded.org%s', None), 40} 41 42# -- General configuration --------------------------------------------------- 43 44# Add any Sphinx extension module names here, as strings. They can be 45# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 46# ones. 47extensions = [ 48 'sphinx.ext.autosectionlabel', 49 'sphinx.ext.extlinks', 50] 51autosectionlabel_prefix_document = True 52 53# Add any paths that contain templates here, relative to this directory. 54templates_path = ['_templates'] 55 56# List of patterns, relative to source directory, that match files and 57# directories to ignore when looking for source files. 58# This pattern also affects html_static_path and html_extra_path. 59exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 60 61# master document name. The default changed from contents to index. so better 62# set it ourselves. 63master_doc = 'index' 64 65# create substitution for project configuration variables 66rst_prolog = """ 67.. |project_name| replace:: %s 68.. |copyright| replace:: %s 69.. |author| replace:: %s 70""" % (project, copyright, author) 71 72# -- Options for HTML output ------------------------------------------------- 73 74# The theme to use for HTML and HTML Help pages. See the documentation for 75# a list of builtin themes. 76# 77try: 78 import sphinx_rtd_theme 79 html_theme = 'sphinx_rtd_theme' 80except ImportError: 81 sys.stderr.write("The Sphinx sphinx_rtd_theme HTML theme was not found.\ 82 \nPlease make sure to install the sphinx_rtd_theme python package.\n") 83 sys.exit(1) 84 85# Add any paths that contain custom static files (such as style sheets) here, 86# relative to this directory. They are copied after the builtin static files, 87# so a file named "default.css" will overwrite the builtin "default.css". 88html_static_path = ['sphinx-static'] 89 90# Add customm CSS and JS files 91html_css_files = ['theme_overrides.css'] 92html_js_files = ['switchers.js'] 93 94# Hide 'Created using Sphinx' text 95html_show_sphinx = False 96 97# Add 'Last updated' on each page 98html_last_updated_fmt = '%b %d, %Y' 99 100# Remove the trailing 'dot' in section numbers 101html_secnumber_suffix = " " 102