1#!/usr/bin/env python3 2# SPDX-License-Identifier: GPL-2.0 3# Configuration file for the Sphinx documentation builder. 4# 5# This file only contains a selection of the most common options. For a full 6# list see the documentation: 7# https://www.sphinx-doc.org/en/master/usage/configuration.html 8 9import os 10import subprocess 11 12project = "libbpf" 13 14extensions = [ 15 'sphinx.ext.autodoc', 16 'sphinx.ext.doctest', 17 'sphinx.ext.mathjax', 18 'sphinx.ext.viewcode', 19 'sphinx.ext.imgmath', 20 'sphinx.ext.todo', 21 'breathe', 22] 23 24# List of patterns, relative to source directory, that match files and 25# directories to ignore when looking for source files. 26# This pattern also affects html_static_path and html_extra_path. 27exclude_patterns = [] 28 29read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' 30 31if read_the_docs_build: 32 subprocess.call('cd sphinx ; make clean', shell=True) 33 subprocess.call('cd sphinx/doxygen ; doxygen', shell=True) 34 35html_theme = 'sphinx_rtd_theme' 36 37breathe_projects = { "libbpf": "./sphinx/doxygen/build/xml/" } 38breathe_default_project = "libbpf" 39breathe_show_define_initializer = True 40breathe_show_enumvalue_initializer = True 41