2019-03-07 17:26:45 +03:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
# QEMU documentation build configuration file, created by
|
|
|
|
# sphinx-quickstart on Thu Jan 31 16:40:14 2019.
|
|
|
|
#
|
2019-03-07 17:26:46 +03:00
|
|
|
# This config file can be used in one of two ways:
|
|
|
|
# (1) as a common config file which is included by the conf.py
|
|
|
|
# for each of QEMU's manuals: in this case sphinx-build is run multiple
|
|
|
|
# times, once per subdirectory.
|
|
|
|
# (2) as a top level conf file which will result in building all
|
|
|
|
# the manuals into a single document: in this case sphinx-build is
|
|
|
|
# run once, on the top-level docs directory.
|
|
|
|
#
|
|
|
|
# QEMU's makefiles take option (1), which allows us to install
|
|
|
|
# only the ones the user cares about (in particular we don't want
|
|
|
|
# to ship the 'devel' manual to end-users).
|
|
|
|
# Third-party sites such as readthedocs.org will take option (2).
|
|
|
|
#
|
|
|
|
#
|
2019-03-07 17:26:45 +03:00
|
|
|
# This file is execfile()d with the current directory set to its
|
|
|
|
# containing dir.
|
|
|
|
#
|
|
|
|
# Note that not all possible configuration values are present in this
|
|
|
|
# autogenerated file.
|
|
|
|
#
|
|
|
|
# All configuration values have a default; values that are commented out
|
|
|
|
# serve to show the default.
|
|
|
|
|
2019-03-07 17:26:46 +03:00
|
|
|
import os
|
|
|
|
import sys
|
2020-02-13 20:56:19 +03:00
|
|
|
import sphinx
|
2020-03-30 15:18:59 +03:00
|
|
|
from sphinx.errors import ConfigError
|
2020-02-13 20:56:19 +03:00
|
|
|
|
2019-03-07 17:26:46 +03:00
|
|
|
# The per-manual conf.py will set qemu_docdir for a single-manual build;
|
|
|
|
# otherwise set it here if this is an entire-manual-set build.
|
|
|
|
# This is always the absolute path of the docs/ directory in the source tree.
|
|
|
|
try:
|
|
|
|
qemu_docdir
|
|
|
|
except NameError:
|
|
|
|
qemu_docdir = os.path.abspath(".")
|
|
|
|
|
2019-03-07 17:26:45 +03:00
|
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
|
|
# add these directories to sys.path here. If the directory is relative to the
|
2019-03-07 17:26:46 +03:00
|
|
|
# documentation root, use an absolute path starting from qemu_docdir.
|
2019-03-07 17:26:45 +03:00
|
|
|
#
|
2020-09-25 19:23:02 +03:00
|
|
|
# Our extensions are in docs/sphinx; the qapidoc extension requires
|
|
|
|
# the QAPI modules from scripts/.
|
2019-07-10 22:08:06 +03:00
|
|
|
sys.path.insert(0, os.path.join(qemu_docdir, "sphinx"))
|
2020-09-25 19:23:02 +03:00
|
|
|
sys.path.insert(0, os.path.join(qemu_docdir, "../scripts"))
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
|
|
|
|
# -- General configuration ------------------------------------------------
|
|
|
|
|
|
|
|
# If your documentation needs a minimal Sphinx version, state it here.
|
|
|
|
#
|
2020-04-14 15:41:14 +03:00
|
|
|
# Sphinx 1.5 and earlier can't build our docs because they are too
|
|
|
|
# picky about the syntax of the argument to the option:: directive
|
|
|
|
# (see Sphinx bugs #646, #3366).
|
|
|
|
needs_sphinx = '1.6'
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
|
|
# ones.
|
2020-09-25 19:23:02 +03:00
|
|
|
extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'qapidoc']
|
2019-03-07 17:26:45 +03:00
|
|
|
|
2021-10-06 00:00:35 +03:00
|
|
|
if sphinx.version_info[:3] > (4, 0, 0):
|
|
|
|
tags.add('sphinx4')
|
|
|
|
extensions += ['dbusdoc']
|
|
|
|
else:
|
|
|
|
extensions += ['fakedbusdoc']
|
|
|
|
|
2019-03-07 17:26:45 +03:00
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
2021-10-09 00:57:51 +03:00
|
|
|
templates_path = [os.path.join(qemu_docdir, '_templates')]
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# The suffix(es) of source filenames.
|
|
|
|
# You can specify multiple suffix as a list of string:
|
|
|
|
#
|
|
|
|
# source_suffix = ['.rst', '.md']
|
|
|
|
source_suffix = '.rst'
|
|
|
|
|
|
|
|
# The master toctree document.
|
|
|
|
master_doc = 'index'
|
|
|
|
|
2021-10-05 00:52:38 +03:00
|
|
|
# Interpret `single-backticks` to be a cross-reference to any kind of
|
|
|
|
# referenceable object. Unresolvable or ambiguous references will emit a
|
|
|
|
# warning at build time.
|
|
|
|
default_role = 'any'
|
|
|
|
|
2019-03-07 17:26:45 +03:00
|
|
|
# General information about the project.
|
|
|
|
project = u'QEMU'
|
2023-05-25 09:43:45 +03:00
|
|
|
copyright = u'2023, The QEMU Project Developers'
|
2019-03-07 17:26:45 +03:00
|
|
|
author = u'The QEMU Project Developers'
|
|
|
|
|
|
|
|
# The version info for the project you're documenting, acts as replacement for
|
|
|
|
# |version| and |release|, also used in various other places throughout the
|
|
|
|
# built documents.
|
2019-03-07 17:26:47 +03:00
|
|
|
|
|
|
|
# Extract this information from the VERSION file, for the benefit of
|
|
|
|
# standalone Sphinx runs as used by readthedocs.org. Builds run from
|
|
|
|
# the Makefile will pass version and release on the sphinx-build
|
|
|
|
# command line, which override this.
|
|
|
|
try:
|
|
|
|
extracted_version = None
|
|
|
|
with open(os.path.join(qemu_docdir, '../VERSION')) as f:
|
|
|
|
extracted_version = f.readline().strip()
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
finally:
|
|
|
|
if extracted_version:
|
|
|
|
version = release = extracted_version
|
|
|
|
else:
|
|
|
|
version = release = "unknown version"
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
|
# for a list of supported languages.
|
|
|
|
#
|
|
|
|
# This is also used if you do content translation via gettext catalogs.
|
|
|
|
# Usually you set "language" from the command line for these cases.
|
2022-06-24 17:42:55 +03:00
|
|
|
language = 'en'
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
|
|
# directories to ignore when looking for source files.
|
|
|
|
# This patterns also effect to html_static_path and html_extra_path
|
|
|
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
|
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
|
|
pygments_style = 'sphinx'
|
|
|
|
|
|
|
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
|
|
todo_include_todos = False
|
|
|
|
|
2019-03-07 17:26:46 +03:00
|
|
|
# Sphinx defaults to warning about use of :option: for options not defined
|
|
|
|
# with "option::" in the document being processed. Turn that off.
|
|
|
|
suppress_warnings = ["ref.option"]
|
2019-03-07 17:26:45 +03:00
|
|
|
|
2019-09-05 16:10:40 +03:00
|
|
|
# The rst_epilog fragment is effectively included in every rST file.
|
|
|
|
# We use it to define substitutions based on build config that
|
|
|
|
# can then be used in the documentation. The fallback if the
|
|
|
|
# environment variable is not set is for the benefit of readthedocs
|
|
|
|
# style document building; our Makefile always sets the variable.
|
|
|
|
confdir = os.getenv('CONFDIR', "/etc/qemu")
|
|
|
|
rst_epilog = ".. |CONFDIR| replace:: ``" + confdir + "``\n"
|
2020-02-28 18:36:00 +03:00
|
|
|
# We slurp in the defs.rst.inc and literally include it into rst_epilog,
|
|
|
|
# because Sphinx's include:: directive doesn't work with absolute paths
|
|
|
|
# and there isn't any one single relative path that will work for all
|
|
|
|
# documents and for both via-make and direct sphinx-build invocation.
|
|
|
|
with open(os.path.join(qemu_docdir, 'defs.rst.inc')) as f:
|
|
|
|
rst_epilog += f.read()
|
2019-09-05 16:10:40 +03:00
|
|
|
|
2019-03-07 17:26:45 +03:00
|
|
|
# -- Options for HTML output ----------------------------------------------
|
|
|
|
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
|
# a list of builtin themes.
|
|
|
|
#
|
2021-03-23 14:53:28 +03:00
|
|
|
try:
|
|
|
|
import sphinx_rtd_theme
|
|
|
|
except ImportError:
|
|
|
|
raise ConfigError(
|
|
|
|
'The Sphinx \'sphinx_rtd_theme\' HTML theme was not found.\n'
|
|
|
|
)
|
|
|
|
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
|
|
# further. For a list of options available for each theme, see the
|
|
|
|
# documentation.
|
docs/conf.py: Remove usage of distutils
The macOS jobs in our CI recently started failing, complaining that
the distutils module is not available anymore. And indeed, according to
https://peps.python.org/pep-0632/ it's been deprecated since a while
and now likely got removed in recent Python versions.
Fortunately, we only use it for a version check via LooseVersion here
which we don't really need anymore - according to Repology.org, these
are the versions of sphinx-rtd-theme that are currently used by the
various distros:
centos_stream_8: 0.3.1
centos_stream_9: 0.5.1
fedora_38: 1.1.1
fedora_39: 1.2.2
freebsd: 1.0.0
haikuports_master: 1.2.1
openbsd: 1.2.2
opensuse_leap_15_5: 0.5.1
pkgsrc_current: 2.0.0
debian_11: 0.5.1
debian_12: 1.2.0
ubuntu_20_04: 0.4.3
ubuntu_22_04: 1.0.0
ubuntu_24_04: 2.0.0
So except for CentOS 8, all distros are using a newer version of
sphinx-rtd-theme, and for CentOS 8 we don't support compiling with
the Sphinx of the distro anymore anyway, since it's based on the
Python 3.6 interpreter there. For compiling on CentOS 8, you have
to use the alternative Python 3.8 interpreter which comes without
Sphinx, so that needs the Sphinx installed via pip in the venv
instead, and that is using a newer version, too, according to our
pythondeps.toml file.
Thus we can simply drop the version check now to get rid of the
distutils dependency here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-id: 20240304130403.129543-1-thuth@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2024-03-04 16:04:03 +03:00
|
|
|
html_theme_options = {
|
|
|
|
"style_nav_header_background": "#802400",
|
|
|
|
"navigation_with_keys": True,
|
|
|
|
}
|
2021-03-23 14:53:28 +03:00
|
|
|
|
|
|
|
html_logo = os.path.join(qemu_docdir, "../ui/icons/qemu_128x128.png")
|
|
|
|
|
|
|
|
html_favicon = os.path.join(qemu_docdir, "../ui/icons/qemu_32x32.png")
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
2021-03-23 14:53:28 +03:00
|
|
|
html_static_path = [os.path.join(qemu_docdir, "sphinx-static")]
|
|
|
|
|
|
|
|
html_css_files = [
|
|
|
|
'theme_overrides.css',
|
|
|
|
]
|
|
|
|
|
2021-10-09 00:47:56 +03:00
|
|
|
html_js_files = [
|
|
|
|
'custom.js',
|
|
|
|
]
|
|
|
|
|
2021-03-23 14:53:28 +03:00
|
|
|
html_context = {
|
|
|
|
"display_gitlab": True,
|
|
|
|
"gitlab_user": "qemu-project",
|
|
|
|
"gitlab_repo": "qemu",
|
|
|
|
"gitlab_version": "master",
|
|
|
|
"conf_py_path": "/docs/", # Path in the checkout to the docs root
|
|
|
|
}
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# Custom sidebar templates, must be a dictionary that maps document names
|
|
|
|
# to template names.
|
2021-03-23 14:53:28 +03:00
|
|
|
#html_sidebars = {}
|
2019-03-07 17:26:45 +03:00
|
|
|
|
2019-03-07 17:26:46 +03:00
|
|
|
# Don't copy the rST source files to the HTML output directory,
|
|
|
|
# and don't put links to the sources into the output HTML.
|
|
|
|
html_copy_source = False
|
2019-03-07 17:26:45 +03:00
|
|
|
|
|
|
|
# -- Options for HTMLHelp output ------------------------------------------
|
|
|
|
|
|
|
|
# Output file base name for HTML help builder.
|
|
|
|
htmlhelp_basename = 'QEMUdoc'
|
|
|
|
|
|
|
|
|
|
|
|
# -- Options for LaTeX output ---------------------------------------------
|
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
# The paper size ('letterpaper' or 'a4paper').
|
|
|
|
#
|
|
|
|
# 'papersize': 'letterpaper',
|
|
|
|
|
|
|
|
# The font size ('10pt', '11pt' or '12pt').
|
|
|
|
#
|
|
|
|
# 'pointsize': '10pt',
|
|
|
|
|
|
|
|
# Additional stuff for the LaTeX preamble.
|
|
|
|
#
|
|
|
|
# 'preamble': '',
|
|
|
|
|
|
|
|
# Latex figure (float) alignment
|
|
|
|
#
|
|
|
|
# 'figure_align': 'htbp',
|
|
|
|
}
|
|
|
|
|
|
|
|
# Grouping the document tree into LaTeX files. List of tuples
|
|
|
|
# (source start file, target name, title,
|
|
|
|
# author, documentclass [howto, manual, or own class]).
|
|
|
|
latex_documents = [
|
|
|
|
(master_doc, 'QEMU.tex', u'QEMU Documentation',
|
|
|
|
u'The QEMU Project Developers', 'manual'),
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
# -- Options for manual page output ---------------------------------------
|
2019-09-05 16:10:40 +03:00
|
|
|
# Individual manual/conf.py can override this to create man pages
|
2021-01-15 18:44:49 +03:00
|
|
|
man_pages = [
|
|
|
|
('interop/qemu-ga', 'qemu-ga',
|
|
|
|
'QEMU Guest Agent',
|
|
|
|
['Michael Roth <mdroth@linux.vnet.ibm.com>'], 8),
|
|
|
|
('interop/qemu-ga-ref', 'qemu-ga-ref',
|
|
|
|
'QEMU Guest Agent Protocol Reference',
|
|
|
|
[], 7),
|
|
|
|
('interop/qemu-qmp-ref', 'qemu-qmp-ref',
|
|
|
|
'QEMU QMP Reference Manual',
|
|
|
|
[], 7),
|
|
|
|
('interop/qemu-storage-daemon-qmp-ref', 'qemu-storage-daemon-qmp-ref',
|
|
|
|
'QEMU Storage Daemon QMP Reference Manual',
|
|
|
|
[], 7),
|
|
|
|
('system/qemu-manpage', 'qemu',
|
|
|
|
'QEMU User Documentation',
|
|
|
|
['Fabrice Bellard'], 1),
|
|
|
|
('system/qemu-block-drivers', 'qemu-block-drivers',
|
|
|
|
'QEMU block drivers reference',
|
|
|
|
['Fabrice Bellard and the QEMU Project developers'], 7),
|
|
|
|
('system/qemu-cpu-models', 'qemu-cpu-models',
|
|
|
|
'QEMU CPU Models',
|
|
|
|
['The QEMU Project developers'], 7),
|
|
|
|
('tools/qemu-img', 'qemu-img',
|
|
|
|
'QEMU disk image utility',
|
|
|
|
['Fabrice Bellard'], 1),
|
|
|
|
('tools/qemu-nbd', 'qemu-nbd',
|
|
|
|
'QEMU Disk Network Block Device Server',
|
|
|
|
['Anthony Liguori <anthony@codemonkey.ws>'], 8),
|
|
|
|
('tools/qemu-pr-helper', 'qemu-pr-helper',
|
|
|
|
'QEMU persistent reservation helper',
|
|
|
|
[], 8),
|
|
|
|
('tools/qemu-storage-daemon', 'qemu-storage-daemon',
|
|
|
|
'QEMU storage daemon',
|
|
|
|
[], 1),
|
|
|
|
('tools/qemu-trace-stap', 'qemu-trace-stap',
|
|
|
|
'QEMU SystemTap trace tool',
|
|
|
|
[], 1),
|
|
|
|
('tools/virtfs-proxy-helper', 'virtfs-proxy-helper',
|
|
|
|
'QEMU 9p virtfs proxy filesystem helper',
|
|
|
|
['M. Mohan Kumar'], 1),
|
|
|
|
]
|
2021-05-03 19:14:22 +03:00
|
|
|
man_make_section_directory = False
|
2019-03-07 17:26:45 +03:00
|
|
|
|
2019-11-29 16:16:12 +03:00
|
|
|
# We use paths starting from qemu_docdir here so that you can run
|
|
|
|
# sphinx-build from anywhere and the kerneldoc extension can still
|
|
|
|
# find everything.
|
2020-10-16 01:06:23 +03:00
|
|
|
kerneldoc_bin = ['perl', os.path.join(qemu_docdir, '../scripts/kernel-doc')]
|
2019-11-29 16:16:12 +03:00
|
|
|
kerneldoc_srctree = os.path.join(qemu_docdir, '..')
|
2020-01-24 19:26:01 +03:00
|
|
|
hxtool_srctree = os.path.join(qemu_docdir, '..')
|
2020-09-25 19:23:02 +03:00
|
|
|
qapidoc_srctree = os.path.join(qemu_docdir, '..')
|
2021-10-06 00:00:35 +03:00
|
|
|
dbusdoc_srctree = os.path.join(qemu_docdir, '..')
|
|
|
|
dbus_index_common_prefix = ["org.qemu."]
|