Merge pull request #4668 from adamscott/template-pool-to-scons_pool
[scons.git] / doc / sphinx / conf.py
blob8bfdc419e55cc9ee7a361aec2bde03b42083269f
1 #!/usr/bin/env python3
3 # SCons documentation build configuration file, created by
4 # sphinx-quickstart on Mon Apr 30 09:36:53 2018.
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
15 # If extensions (or modules to document with autodoc) are in another directory,
16 # add these directories to sys.path here. If the directory is relative to the
17 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 import os
20 import sys
21 sys.path.insert(0, os.path.abspath('../../'))
23 # -- General configuration ------------------------------------------------
25 # If your documentation needs a minimal Sphinx version, state it here.
27 needs_sphinx = '1.3'
29 # Add any Sphinx extension module names here, as strings. They can be
30 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31 # ones.
32 extensions = [
33 #'autoclasstoc', # TODO: figure out how to make this useful
34 'sphinx.ext.autodoc',
35 'sphinx.ext.autosummary',
36 #'sphinx.ext.githubpages'
37 'sphinx.ext.napoleon',
38 'sphinx.ext.todo',
39 'sphinx.ext.viewcode',
40 #'sphinx_rtd_theme',
41 'rst2pdf.pdfbuilder',
44 autosummary_generate = True
46 autodoc_default_options = {
47 "members": True,
48 "special-members": False,
49 "private-members": True,
50 "inherited-members": True,
51 "undoc-members": True,
52 "exclude-members": '__weakref__',
54 autodoc_exclude_members = ['*Tests']
56 # Napoleon settings. Nearly all defaults, listed explicitly to be safe.
57 # See: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#configuration
58 napoleon_google_docstring = True
59 napoleon_numpy_docstring = True
60 napoleon_include_init_with_doc = False
61 napoleon_include_private_with_doc = True
62 napoleon_include_special_with_doc = True # not default
63 napoleon_use_admonition_for_examples = True # not default
64 napoleon_use_admonition_for_notes = False
65 napoleon_use_admonition_for_references = False
66 napoleon_use_ivar = True # not default
67 napoleon_use_param = True
68 napoleon_use_rtype = True
69 napoleon_preprocess_types = False
70 napoleon_type_aliases = None
71 napoleon_attr_annotations = True
73 # Add any paths that contain templates here, relative to this directory.
74 templates_path = ['_templates']
76 # Since 0.99, rst2pdf says: "twoColumn isn't part of the default styles
77 # in 0.99. You need to add the twocolumn style file."
78 pdf_stylesheets = ['twocolumn']
80 # The suffix(es) of source filenames.
81 # You can specify multiple suffix as a list of string:
83 source_suffix = '.rst'
85 # The master toctree document.
86 master_doc = 'index'
88 # General information about the project.
89 project = 'SCons'
90 copyright = '2022, SCons Project'
91 author = 'SCons Project Team'
93 # The version info for the project you're documenting, acts as replacement for
94 # |version| and |release|, also used in various other places throughout the
95 # built documents.
97 from SCons import __version__
98 # The full version, including alpha/beta/rc tags:
99 release = __version__
100 # The short X.Y version.
101 version_parts = __version__.split('.')
102 major, minor, patch = version_parts[0:3]
103 version = '.'.join([major, minor,patch])
105 # The language for content autogenerated by Sphinx. Refer to documentation
106 # for a list of supported languages.
108 # This is also used if you do content translation via gettext catalogs.
109 # Usually you set "language" from the command line for these cases.
110 language = 'en'
112 # List of patterns, relative to source directory, that match files and
113 # directories to ignore when looking for source files.
114 # This pattern also affects html_static_path and html_extra_path .
115 exclude_patterns = ["*Tests.py"]
117 # The name of the Pygments (syntax highlighting) style to use.
118 pygments_style = 'sphinx'
120 # If true, `todo` and `todoList` produce output, else they produce nothing.
121 todo_include_todos = False
124 # -- Options for HTML output ----------------------------------------------
126 # The theme to use for HTML and HTML Help pages. See the documentation for
127 # a list of builtin themes.
129 #html_theme = "sphinx_rtd_theme"
130 html_theme = "sphinx_book_theme"
132 # Theme options are theme-specific and customize the look and feel of a theme
133 # further. For a list of options available for each theme, see the
134 # documentation.
136 html_theme_options = {
137 "collapse_navigation": False,
138 "navigation_depth": 3,
141 # Add any paths that contain custom static files (such as style sheets) here,
142 # relative to this directory. They are copied after the builtin static files,
143 # so a file named "default.css" will overwrite the builtin "default.css".
144 html_static_path = ['_static']
146 # Custom sidebar templates, must be a dictionary that maps document names
147 # to template names.
149 # The default sidebars (for documents that don't match any pattern) are
150 # defined by theme itself. Builtin themes are using these templates by
151 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
152 # 'searchbox.html']``.
154 # html_sidebars = {}
156 # -- Options for HTMLHelp output ------------------------------------------
158 # Output file base name for HTML help builder.
159 htmlhelp_basename = 'SConsAPIDocs'
162 # -- Options for LaTeX output ---------------------------------------------
164 latex_elements = {
165 # The paper size ('letterpaper' or 'a4paper').
167 # 'papersize': 'letterpaper',
169 # The font size ('10pt', '11pt' or '12pt').
171 # 'pointsize': '10pt',
173 # Additional stuff for the LaTeX preamble.
175 # 'preamble': '',
177 # Latex figure (float) alignment
179 # 'figure_align': 'htbp',
183 # Grouping the document tree into LaTeX files. List of tuples
184 # (source start file, target name, title,
185 # author, documentclass [howto, manual, or own class]).
186 latex_documents = [
188 master_doc,
189 "SConsAPIDocs.tex",
190 "SCons API Documentation",
191 "SCons Project",
192 "manual",
197 # -- Options for manual page output ---------------------------------------
199 # One entry per manual page. List of tuples
200 # (source start file, name, description, authors, manual section).
201 man_pages = [
202 (master_doc, 'sconsapidocs', 'SCons API Documentation', [author], 1)
206 # -- Options for Texinfo output -------------------------------------------
208 # Grouping the document tree into Texinfo files. List of tuples
209 # (source start file, target name, title, author,
210 # dir menu entry, description, category)
211 texinfo_documents = [
213 master_doc,
214 "SConsAPIDocs",
215 "SCons API Documentation",
216 author,
217 "SConsAPIDocs",
218 "One line description of project.",
219 "Miscellaneous",
224 # -- Options for Epub output -------------------------------------------------
228 # -- for PDF
229 # Grouping the document tree into PDF files. List of tuples
230 # (source start file, target name, title, author, options).
231 pdf_documents = [('index', 'scons-api', 'SCons API Docs', 'SCons Project'),]