diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-11-13 00:21:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-04 10:55:00 +0000 |
commit | 22384b2fe567406b3c318b2edd0d23dee0d72023 (patch) | |
tree | b19414c699324722f371d4138c305e925a43da95 /bitbake/doc/conf.py | |
parent | 16d477fa5d2bec49ccd83ede8249431d30e0c80c (diff) | |
download | poky-22384b2fe567406b3c318b2edd0d23dee0d72023.tar.gz |
bitbake: sphinx: import sphinx docs
The Bitbake manual was migrated to Sphinx in Yocto Project 3.2. Since
the docs between 3.2 and 3.1 are "similar", and since 3.1 is an LTS
release, we agreed to backport the documentation onto 3.1.
If we look at all docs changes in 3.1 and 3.2, we have the following:
=== Changes in 3.1
git log --oneline b94dec477a8d48ebceec91952ba290798c56c1f5..origin/1.46 -- doc/
====
324aaa7f bitbake-user-manual-metadata.xml: fix a minor error
f92e19a3 doc: More explanation to tasks that recursively depend on themselves
e4695176 doc: Clarify how task dependencies relate to RDEPENDS
25c5c79b user manual: properly tag content as <replaceable>
be367887 docs: delete reference to obsolete recipe-depends.dot
=== Changes in 3.2/master
git log --oneline b94dec477a8d48ebceec91952ba290798c56c1f5..origin/master -- doc/
====
a7c47f1e sphinx: rename Makefile.sphinx
427721d8 sphinx: remove DocBook files
d52190ea docs: static: theme_overrides.css: fix responsive design on <640px screens
9ae5cce7 docs: sphinx: report errors when dependencies are not met
ec4c481a docs: update README file after migrationg to Sphinx
c87cc35a docs: sphinx: replace special quotes with double quotes
ebdeef2c docs: ref-variables: add links to terms in glossary
29081375 bitbake-user-manual: fix bad links
a0f37789 sphinx: theme_override: Use bold for emphasis text
cbc5ca48 sphinx: theme_override: properly set font for verbatim text
08b1ae23 sphinx: remove leading '/'
99ba6fe9 sphinx: update style for important, caution and warnings
d99760cc sphinx: last manual round of fixes/improvements
4f94633a sphinx: bitbake-user-manual: insert additional blank line after title
63adcaa5 sphinx: add releases page
3e940d93 sphinx: conf: enable extlinks extension
9921c652 sphinx: index: move the boilerplate at the end of the page
4e461224 sphinx: add SPDX headers
cb19159c sphinx: Enhance the sphinx experience/nagivation with:
10a54678 sphinx: tweak html output a bit
219b2348 sphinx: Makefile.sphinx: add clean and publish targets
35fdc185 sphinx: fixes all remaining warnings
e11d2dd1 sphinx: fix links inside notes
57300955 sphinx: fixup for links
fa304c01 sphinx: override theme CSS
29af1cd2 sphinx: switch to readthedocs theme
e8359fd8 sphinx: bitbake-user-manual: use builtin sphinx glossary
6bf6c8d6 sphinx: initial sphinx support
84ccba0f sphinx: add initial build infrastructure
44b57216 bitbake-user-manual: update perforce fetcher docs
9186ca47 bitbake-user-manual: Add BBFILES_DYNAMIC
7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example
06b5cf0a bitbake-user-manual-metadata.xml: fix a minor error
c92a266c doc: More explanation to tasks that recursively depend on themselves
caf42243 doc: Clarify how task dependencies relate to RDEPENDS
647c13d4 user manual: properly tag content as <replaceable>
2effbb6e docs: delete reference to obsolete recipe-depends.dot
We can conclude the following commits exist in 3.2 and not in 3.1 (if
we filter out sphinx changes)
44b57216 bitbake-user-manual: update perforce fetcher docs
9186ca47 bitbake-user-manual: Add BBFILES_DYNAMIC
7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example
Out of these 3 changes, the following patches are for 3.2 only:
44b57216 bitbake-user-manual: update perforce fetcher docs
7689fa78 bitbake-user-manual: Remove TERM from BB_HASHBASE_WHITELIST example
To backport the Sphinx docs, we then need to cherry-pick all docs
patches from 3.2/1.48 and 'undo' the two patches above.
This first patch is the first step that imports all Sphinx files, and
remove Docbook files. It was done with the following command:
git cherry-pick -n \
$(git log --reverse --oneline \
b94dec477a8d48ebceec91952ba290798c56c1f5..origin/master -- doc/ \
| cut -f1 -d' ')
(Bitbake rev: cd68f14031eb45006b44d10b348e35c69ac21ad0)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc/conf.py')
-rw-r--r-- | bitbake/doc/conf.py | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/bitbake/doc/conf.py b/bitbake/doc/conf.py new file mode 100644 index 0000000000..354dff36f7 --- /dev/null +++ b/bitbake/doc/conf.py | |||
@@ -0,0 +1,100 @@ | |||
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 | |||
17 | import datetime | ||
18 | |||
19 | current_version = "dev" | ||
20 | |||
21 | # String used in sidebar | ||
22 | version = 'Version: ' + current_version | ||
23 | if current_version == 'dev': | ||
24 | version = 'Version: Current Development' | ||
25 | # Version seen in documentation_options.js and hence in js switchers code | ||
26 | release = current_version | ||
27 | |||
28 | # -- Project information ----------------------------------------------------- | ||
29 | |||
30 | project = 'Bitbake' | ||
31 | copyright = '2004-%s, Richard Purdie, Chris Larson, and Phil Blundell' \ | ||
32 | % datetime.datetime.now().year | ||
33 | author = 'Richard Purdie, Chris Larson, and Phil Blundell' | ||
34 | |||
35 | # external links and substitutions | ||
36 | extlinks = { | ||
37 | 'yocto_docs': ('https://docs.yoctoproject.org%s', None), | ||
38 | 'oe_lists': ('https://lists.openembedded.org%s', None), | ||
39 | } | ||
40 | |||
41 | # -- General configuration --------------------------------------------------- | ||
42 | |||
43 | # Add any Sphinx extension module names here, as strings. They can be | ||
44 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
45 | # ones. | ||
46 | extensions = [ | ||
47 | 'sphinx.ext.autosectionlabel', | ||
48 | 'sphinx.ext.extlinks', | ||
49 | ] | ||
50 | autosectionlabel_prefix_document = True | ||
51 | |||
52 | # Add any paths that contain templates here, relative to this directory. | ||
53 | templates_path = ['_templates'] | ||
54 | |||
55 | # List of patterns, relative to source directory, that match files and | ||
56 | # directories to ignore when looking for source files. | ||
57 | # This pattern also affects html_static_path and html_extra_path. | ||
58 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
59 | |||
60 | # master document name. The default changed from contents to index. so better | ||
61 | # set it ourselves. | ||
62 | master_doc = 'index' | ||
63 | |||
64 | # create substitution for project configuration variables | ||
65 | rst_prolog = """ | ||
66 | .. |project_name| replace:: %s | ||
67 | .. |copyright| replace:: %s | ||
68 | .. |author| replace:: %s | ||
69 | """ % (project, copyright, author) | ||
70 | |||
71 | # -- Options for HTML output ------------------------------------------------- | ||
72 | |||
73 | # The theme to use for HTML and HTML Help pages. See the documentation for | ||
74 | # a list of builtin themes. | ||
75 | # | ||
76 | try: | ||
77 | import sphinx_rtd_theme | ||
78 | html_theme = 'sphinx_rtd_theme' | ||
79 | except ImportError: | ||
80 | sys.stderr.write("The Sphinx sphinx_rtd_theme HTML theme was not found.\ | ||
81 | \nPlease make sure to install the sphinx_rtd_theme python package.\n") | ||
82 | sys.exit(1) | ||
83 | |||
84 | # Add any paths that contain custom static files (such as style sheets) here, | ||
85 | # relative to this directory. They are copied after the builtin static files, | ||
86 | # so a file named "default.css" will overwrite the builtin "default.css". | ||
87 | html_static_path = ['sphinx-static'] | ||
88 | |||
89 | # Add customm CSS and JS files | ||
90 | html_css_files = ['theme_overrides.css'] | ||
91 | html_js_files = ['switchers.js'] | ||
92 | |||
93 | # Hide 'Created using Sphinx' text | ||
94 | html_show_sphinx = False | ||
95 | |||
96 | # Add 'Last updated' on each page | ||
97 | html_last_updated_fmt = '%b %d, %Y' | ||
98 | |||
99 | # Remove the trailing 'dot' in section numbers | ||
100 | html_secnumber_suffix = " " | ||