Files
rocm-systems/projects/amdsmi/docs/conf.py
T
Sam Wu 505a8bc3c4 add configurations for sphinx documentation
Change-Id: I5672348aab0f20d0bfc4dd1efcfecdf4324342d6


[ROCm/amdsmi commit: c5e06b4040]
2023-05-30 16:08:54 -06:00

27 líneas
824 B
Python

# 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:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import subprocess
from rocm_docs import ROCmDocs
name = "AMD SMI"
get_version = r'sed -n -e "s/^get_package_version_number(.*\"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt'
version = subprocess.getoutput(get_version)
if len(version) > 0:
name = f"{name} {version}"
external_toc_path = "./sphinx/_toc.yml"
docs_core = ROCmDocs(f"{name} Documentation")
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/docBin/xml")
docs_core.enable_api_reference()
docs_core.setup()
for sphinx_var in ROCmDocs.SPHINX_VARS:
globals()[sphinx_var] = getattr(docs_core, sphinx_var)