| 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 warnings |
| 14 |
|
| 15 |
import build |
| 16 |
|
| 17 |
|
| 18 |
if hasattr(__builtins__, 'EncodingWarning'): |
| 19 |
warnings.filterwarnings('ignore', category=EncodingWarning, module='sphinx_copybutton') |
| 20 |
|
| 21 |
|
| 22 |
# -- Project information ----------------------------------------------------- |
| 23 |
|
| 24 |
project = 'build' |
| 25 |
copyright = '2020, Filipe Laíns' |
| 26 |
author = 'Filipe Laíns' |
| 27 |
|
| 28 |
# The short X.Y version |
| 29 |
version = build.__version__ |
| 30 |
# The full version, including alpha/beta/rc tags |
| 31 |
release = build.__version__ |
| 32 |
|
| 33 |
|
| 34 |
# -- General configuration --------------------------------------------------- |
| 35 |
|
| 36 |
# Add any Sphinx extension module names here, as strings. They can be |
| 37 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 38 |
# ones. |
| 39 |
extensions = [ |
| 40 |
'sphinx.ext.autodoc', |
| 41 |
'sphinx.ext.intersphinx', |
| 42 |
'sphinx_autodoc_typehints', |
| 43 |
'sphinx_argparse_cli', |
| 44 |
'sphinx_copybutton', |
| 45 |
'sphinx_inline_tabs', |
| 46 |
'sphinx_issues', |
| 47 |
'sphinxcontrib.mermaid', |
| 48 |
] |
| 49 |
|
| 50 |
intersphinx_mapping = { |
| 51 |
'python': ('https://docs.python.org/3/', None), |
| 52 |
'packaging': ('https://packaging.python.org/en/latest/', None), |
| 53 |
} |
| 54 |
|
| 55 |
# Add any paths that contain templates here, relative to this directory. |
| 56 |
templates_path = ['_templates'] |
| 57 |
|
| 58 |
# List of patterns, relative to source directory, that match files and |
| 59 |
# directories to ignore when looking for source files. |
| 60 |
# This pattern also affects html_static_path and html_extra_path. |
| 61 |
exclude_patterns = ['changelog/*'] |
| 62 |
|
| 63 |
default_role = 'any' |
| 64 |
|
| 65 |
# -- Options for HTML output ------------------------------------------------- |
| 66 |
|
| 67 |
# The theme to use for HTML and HTML Help pages. See the documentation for |
| 68 |
# a list of builtin themes. |
| 69 |
# |
| 70 |
html_theme = 'furo' |
| 71 |
html_title = f'build - {version}' |
| 72 |
html_show_sourcelink = False |
| 73 |
html_favicon = '_static/logo.svg' |
| 74 |
html_theme_options = { |
| 75 |
'light_logo': 'logo.svg', |
| 76 |
'dark_logo': 'logo.svg', |
| 77 |
} |
| 78 |
|
| 79 |
# Add any paths that contain custom static files (such as style sheets) here, |
| 80 |
# relative to this directory. They are copied after the builtin static files, |
| 81 |
# so a file named 'default.css' will overwrite the builtin 'default.css'. |
| 82 |
html_static_path = ['_static'] |
| 83 |
html_css_files = ['custom.css'] |
| 84 |
|
| 85 |
autoclass_content = 'both' |
| 86 |
|
| 87 |
nitpick_ignore = [ |
| 88 |
# https://github.com/python/importlib_metadata/issues/316 |
| 89 |
('py:class', 'importlib.metadata._meta.PackageMetadata'), |
| 90 |
('py:data', 'typing.Union'), |
| 91 |
] |
| 92 |
|
| 93 |
|
| 94 |
issues_github_path = 'pypa/build' |
| 95 |
|
| 96 |
copybutton_prompt_text = r'>>> |\.\.\. |\$ ' |
| 97 |
copybutton_prompt_is_regexp = True |
| 98 |
copybutton_only_copy_prompt_lines = False |
| 99 |
copybutton_remove_prompts = True |