summaryrefslogtreecommitdiff
path: root/ext/pybind11/docs/conf.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-05-09 19:22:53 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-05-22 17:15:09 +0000
commit6914a229a038206341ae1fea46393965a555ca9a (patch)
tree4a11cfaed46dabc827c5ee17cd976f42b5f53d49 /ext/pybind11/docs/conf.py
parentca1d18d599dcc620bf526fb22042af95b1b60b68 (diff)
downloadgem5-6914a229a038206341ae1fea46393965a555ca9a.tar.xz
ext: Upgrade PyBind11 to version 2.1.1
Change-Id: I16870dec402d661295f9d013dc23e362b2b2c169 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3225 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'ext/pybind11/docs/conf.py')
-rw-r--r--ext/pybind11/docs/conf.py34
1 files changed, 29 insertions, 5 deletions
diff --git a/ext/pybind11/docs/conf.py b/ext/pybind11/docs/conf.py
index 69f0cb337..09604cfeb 100644
--- a/ext/pybind11/docs/conf.py
+++ b/ext/pybind11/docs/conf.py
@@ -16,6 +16,7 @@
import sys
import os
import shlex
+import subprocess
# 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
@@ -30,7 +31,11 @@ import shlex
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
-extensions = []
+extensions = ['breathe']
+
+breathe_projects = {'pybind11': '.build/doxygenxml/'}
+breathe_default_project = 'pybind11'
+breathe_domain_by_extension = {'h': 'cpp'}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
@@ -48,7 +53,7 @@ master_doc = 'index'
# General information about the project.
project = 'pybind11'
-copyright = '2015, Wenzel Jakob'
+copyright = '2016, Wenzel Jakob'
author = 'Wenzel Jakob'
# The version info for the project you're documenting, acts as replacement for
@@ -56,9 +61,9 @@ author = 'Wenzel Jakob'
# built documents.
#
# The short X.Y version.
-version = '1.9'
+version = '2.1'
# The full version, including alpha/beta/rc tags.
-release = '1.9.dev0'
+release = '2.1.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -79,7 +84,7 @@ exclude_patterns = ['.build', 'release.rst']
# The reST default role (used for this markup: `text`) to use for all
# documents.
-#default_role = None
+default_role = 'any'
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
@@ -306,3 +311,22 @@ texinfo_documents = [
primary_domain = 'cpp'
highlight_language = 'cpp'
+
+
+def generate_doxygen_xml(app):
+ build_dir = '.build'
+ if not os.path.exists(build_dir):
+ os.mkdir(build_dir)
+
+ try:
+ subprocess.call(['doxygen', '--version'])
+ retcode = subprocess.call(['doxygen'])
+ if retcode < 0:
+ sys.stderr.write("doxygen error code: {}\n".format(-retcode))
+ except OSError as e:
+ sys.stderr.write("doxygen execution failed: {}\n".format(e))
+
+
+def setup(app):
+ """Add hook for building doxygen xml when needed"""
+ app.connect("builder-inited", generate_doxygen_xml)