icalendar/docs/conf.py

49 wiersze
1.2 KiB
Python
Czysty Zwykły widok Historia

# icalendar documentation build configuration file
import importlib.metadata
import datetime
2015-01-19 13:26:09 +00:00
import os
2025-03-19 11:50:49 +00:00
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
2015-01-19 13:26:09 +00:00
try:
import sphinx_rtd_theme
2025-03-19 11:50:49 +00:00
html_theme = "sphinx_rtd_theme"
2015-01-19 13:26:09 +00:00
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
2025-03-19 11:50:49 +00:00
html_theme = "default"
2015-01-19 13:26:09 +00:00
if not on_rtd:
2025-03-19 11:50:49 +00:00
print("-" * 74)
print(
"Warning: sphinx-rtd-theme not installed, building with default " "theme."
)
print("-" * 74)
extensions = [
2025-03-19 11:50:49 +00:00
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_copybutton",
"sphinx.ext.intersphinx",
"sphinx.ext.autosectionlabel",
]
2025-03-19 11:50:49 +00:00
source_suffix = ".rst"
master_doc = "index"
2011-08-17 22:07:32 +00:00
2025-03-19 11:50:49 +00:00
project = "icalendar"
2014-09-05 10:05:43 +00:00
this_year = datetime.date.today().year
2025-03-19 11:50:49 +00:00
copyright = f"{this_year}, Plone Foundation"
version = importlib.metadata.version("icalendar")
release = version
2011-08-17 22:07:32 +00:00
2025-03-19 11:50:49 +00:00
exclude_patterns = ["_build", "lib", "bin", "include", "local"]
pygments_style = "sphinx"
2011-08-17 22:07:32 +00:00
2025-03-19 11:50:49 +00:00
htmlhelp_basename = "icalendardoc"
2011-08-17 22:07:32 +00:00
2025-03-19 11:50:49 +00:00
man_pages = [("index", "icalendar", "icalendar Documentation", ["Plone Foundation"], 1)]
2025-01-17 16:41:09 +00:00
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}