2014-11-20 12:14:45 +00:00
|
|
|
# icalendar documentation build configuration file
|
2024-06-21 00:20:46 +00:00
|
|
|
import importlib.metadata
|
2014-11-20 12:14:45 +00:00
|
|
|
import datetime
|
2015-01-19 13:26:09 +00:00
|
|
|
import os
|
2014-11-20 12:14:45 +00:00
|
|
|
|
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)
|
2014-11-20 12:14:45 +00:00
|
|
|
|
|
|
|
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",
|
2014-11-20 12:14:45 +00:00
|
|
|
]
|
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")
|
2014-09-05 10:04:12 +00:00
|
|
|
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),
|
|
|
|
}
|