2022-01-16 17:33:05 -05:00
|
|
|
# This file is placed in the public domain or under the
|
|
|
|
# CC0-1.0-Universal license, whichever is more permissive.
|
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
"""Configuration for building PEPs using Sphinx."""
|
|
|
|
|
2021-06-08 20:37:55 -04:00
|
|
|
from pathlib import Path
|
2021-06-30 15:19:44 -04:00
|
|
|
import sys
|
2021-06-08 20:37:55 -04:00
|
|
|
|
2023-07-12 11:28:43 -04:00
|
|
|
sys.path.append(str(Path(".").absolute()))
|
2021-06-08 20:37:55 -04:00
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
|
|
|
|
project = "PEPs"
|
|
|
|
master_doc = "contents"
|
|
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
|
2021-06-08 20:37:55 -04:00
|
|
|
# Add any Sphinx extension module names here, as strings.
|
2022-08-02 23:48:56 -04:00
|
|
|
extensions = [
|
2022-10-05 13:03:04 -04:00
|
|
|
"pep_sphinx_extensions",
|
|
|
|
"sphinx.ext.intersphinx",
|
|
|
|
"sphinx.ext.githubpages",
|
2022-08-02 23:48:56 -04:00
|
|
|
]
|
2021-06-08 20:37:55 -04:00
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
# The file extensions of source files. Sphinx uses these suffixes as sources.
|
|
|
|
source_suffix = {
|
2021-06-08 20:37:55 -04:00
|
|
|
".rst": "pep",
|
|
|
|
".txt": "pep",
|
2021-06-08 19:11:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
# List of patterns (relative to source dir) to ignore when looking for source files.
|
2022-03-13 21:44:36 -04:00
|
|
|
include_patterns = [
|
|
|
|
# Required for Sphinx
|
|
|
|
"contents.rst",
|
|
|
|
# PEP files
|
|
|
|
"pep-????.rst",
|
|
|
|
"pep-????.txt",
|
|
|
|
# PEP ancillary files
|
|
|
|
"pep-????/*.rst",
|
|
|
|
# Documentation
|
|
|
|
"docs/*.rst",
|
|
|
|
]
|
2021-06-08 19:11:26 -04:00
|
|
|
exclude_patterns = [
|
2022-03-13 21:44:36 -04:00
|
|
|
# PEP Template
|
|
|
|
"pep-0012/pep-NNNN.rst",
|
2021-06-08 19:11:26 -04:00
|
|
|
]
|
|
|
|
|
2022-08-02 23:48:56 -04:00
|
|
|
# Intersphinx configuration
|
|
|
|
intersphinx_mapping = {
|
|
|
|
'python': ('https://docs.python.org/3/', None),
|
|
|
|
'packaging': ('https://packaging.python.org/en/latest/', None),
|
2023-05-09 05:44:32 -04:00
|
|
|
'devguide': ('https://devguide.python.org/', None),
|
2023-02-15 07:32:31 -05:00
|
|
|
'py3.11': ('https://docs.python.org/3.11/', None),
|
2023-03-02 05:28:07 -05:00
|
|
|
'py3.12': ('https://docs.python.org/3.12/', None),
|
2022-08-02 23:48:56 -04:00
|
|
|
}
|
|
|
|
intersphinx_disabled_reftypes = []
|
|
|
|
|
2021-06-08 19:11:26 -04:00
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
|
|
|
|
# HTML output settings
|
2021-06-08 20:37:55 -04:00
|
|
|
html_math_renderer = "maths_to_html" # Maths rendering
|
2021-06-30 15:19:44 -04:00
|
|
|
|
|
|
|
# Theme settings
|
|
|
|
html_theme_path = ["pep_sphinx_extensions"]
|
|
|
|
html_theme = "pep_theme" # The actual theme directory (child of html_theme_path)
|
|
|
|
html_use_index = False # Disable index (we use PEP 0)
|
|
|
|
html_style = "" # must be defined here or in theme.conf, but is unused
|
|
|
|
html_permalinks = False # handled in the PEPContents transform
|
2022-03-09 14:00:12 -05:00
|
|
|
html_baseurl = "https://peps.python.org" # to create the CNAME file
|
2022-01-09 13:07:03 -05:00
|
|
|
gettext_auto_build = False # speed-ups
|
2021-06-30 15:19:44 -04:00
|
|
|
|
2022-08-02 23:48:56 -04:00
|
|
|
templates_path = ["pep_sphinx_extensions/pep_theme/templates"] # Theme template relative paths from `confdir`
|