Files
rocm-systems/source/docs/conf.py
T

108 rivejä
3.3 KiB
Python
Raaka Normaali näkymä Historia

2023-09-12 12:34:36 -05:00
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys
import subprocess as sp
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(".."))
def install(package):
sp.call([sys.executable, "-m", "pip", "install", package])
# Check if we're running on Read the Docs' servers
read_the_docs_build = os.environ.get("READTHEDOCS", None) == "True"
2024-06-22 00:10:54 +05:30
_srcdir = os.path.realpath(os.path.join(os.getcwd(), "../.."))
def build_doxyfile():
sp.run(
[
"cmake",
f"-DSOURCE_DIR={_srcdir}",
"-DPROJECT_NAME='Rocprofiler SDK'",
f"-P {_srcdir}/source/docs/generate-doxyfile.cmake",
]
)
def configure_version_header():
sp.run(
[
"cmake",
f"-S {_srcdir}/source/include/rocprofiler-sdk",
f"-B {_srcdir}/source/include/rocprofiler-sdk",
]
)
configure_version_header()
build_doxyfile()
2023-09-12 12:34:36 -05:00
# -- Project information -----------------------------------------------------
project = "Rocprofiler SDK"
2025-01-23 06:41:20 +05:30
copyright = "2023-2025, Advanced Micro Devices, Inc."
2023-11-14 10:58:33 -06:00
author = "Advanced Micro Devices, Inc."
2023-09-12 12:34:36 -05:00
project_root = os.path.normpath(os.path.join(os.getcwd(), "..", ".."))
version = open(os.path.join(project_root, "VERSION")).read().strip()
# The full version, including alpha/beta/rc tags
release = version
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
2024-06-22 00:10:54 +05:30
"rocm_docs",
"rocm_docs.doxygen",
2023-09-12 12:34:36 -05:00
]
2024-06-22 00:10:54 +05:30
doxygen_root = "."
doxysphinx_enabled = True
doxygen_project = {
"name": "rocprofiler-sdk",
2025-01-22 23:04:21 +05:30
"path": "_doxygen",
2023-09-12 12:34:36 -05:00
}
2024-06-22 00:10:54 +05:30
doxyfile = "rocprofiler-sdk.dox"
2023-09-12 12:34:36 -05:00
2024-06-22 00:10:54 +05:30
external_projects_current_project = "rocprofiler-sdk"
external_projects = []
2023-09-12 12:34:36 -05:00
master_doc = "index"
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "README.md"]
2024-06-22 00:10:54 +05:30
external_toc_path = "./_toc.yml"
2023-09-12 12:34:36 -05:00
2024-06-22 00:10:54 +05:30
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
suppress_warnings = ["etoc.toctree"]
2023-09-12 12:34:36 -05:00
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
2024-06-22 00:10:54 +05:30
html_theme = "rocm_docs_theme"
html_theme_options = {"flavor": "rocm"}
2023-09-12 12:34:36 -05:00
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
2024-06-22 00:10:54 +05:30
html_title = f"ROCprofiler-SDK {version} Documentation"