1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# 4# pybind11 documentation build configuration file, created by 5# sphinx-quickstart on Sun Oct 11 19:23:48 2015. 6# 7# This file is execfile()d with the current directory set to its 8# containing dir. 9# 10# Note that not all possible configuration values are present in this 11# autogenerated file. 12# 13# All configuration values have a default; values that are commented out 14# serve to show the default. 15 16import sys 17import os 18import shlex |
19import subprocess |
20 21# If extensions (or modules to document with autodoc) are in another directory, 22# add these directories to sys.path here. If the directory is relative to the 23# documentation root, use os.path.abspath to make it absolute, like shown here. 24#sys.path.insert(0, os.path.abspath('.')) 25 26# -- General configuration ------------------------------------------------ 27 28# If your documentation needs a minimal Sphinx version, state it here. 29#needs_sphinx = '1.0' 30 31# Add any Sphinx extension module names here, as strings. They can be 32# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 33# ones. |
34extensions = ['breathe'] |
35 |
36breathe_projects = {'pybind11': '.build/doxygenxml/'} 37breathe_default_project = 'pybind11' 38breathe_domain_by_extension = {'h': 'cpp'} 39 |
40# Add any paths that contain templates here, relative to this directory. 41templates_path = ['.templates'] 42 43# The suffix(es) of source filenames. 44# You can specify multiple suffix as a list of string: 45# source_suffix = ['.rst', '.md'] 46source_suffix = '.rst' 47 48# The encoding of source files. 49#source_encoding = 'utf-8-sig' 50 51# The master toctree document. 52master_doc = 'index' 53 54# General information about the project. 55project = 'pybind11' |
56copyright = '2016, Wenzel Jakob' |
57author = 'Wenzel Jakob' 58 59# The version info for the project you're documenting, acts as replacement for 60# |version| and |release|, also used in various other places throughout the 61# built documents. 62# 63# The short X.Y version. |
64version = '2.1' |
65# The full version, including alpha/beta/rc tags. |
66release = '2.1.1' |
67 68# The language for content autogenerated by Sphinx. Refer to documentation 69# for a list of supported languages. 70# 71# This is also used if you do content translation via gettext catalogs. 72# Usually you set "language" from the command line for these cases. 73language = None 74 --- 4 unchanged lines hidden (view full) --- 79#today_fmt = '%B %d, %Y' 80 81# List of patterns, relative to source directory, that match files and 82# directories to ignore when looking for source files. 83exclude_patterns = ['.build', 'release.rst'] 84 85# The reST default role (used for this markup: `text`) to use for all 86# documents. |
87default_role = 'any' |
88 89# If true, '()' will be appended to :func: etc. cross-reference text. 90#add_function_parentheses = True 91 92# If true, the current module name will be prepended to all description 93# unit titles (such as .. function::). 94#add_module_names = True 95 --- 210 unchanged lines hidden (view full) --- 306# How to display URL addresses: 'footnote', 'no', or 'inline'. 307#texinfo_show_urls = 'footnote' 308 309# If true, do not generate a @detailmenu in the "Top" node's menu. 310#texinfo_no_detailmenu = False 311 312primary_domain = 'cpp' 313highlight_language = 'cpp' |
314 315 316def generate_doxygen_xml(app): 317 build_dir = '.build' 318 if not os.path.exists(build_dir): 319 os.mkdir(build_dir) 320 321 try: 322 subprocess.call(['doxygen', '--version']) 323 retcode = subprocess.call(['doxygen']) 324 if retcode < 0: 325 sys.stderr.write("doxygen error code: {}\n".format(-retcode)) 326 except OSError as e: 327 sys.stderr.write("doxygen execution failed: {}\n".format(e)) 328 329 330def setup(app): 331 """Add hook for building doxygen xml when needed""" 332 app.connect("builder-inited", generate_doxygen_xml) |