19from pathlib
import Path
21DIR = Path(__file__).parent.resolve()
39 "sphinxcontrib.rsvgconverter",
40 "sphinxcontrib.moderncmakedomain",
43breathe_projects = {
"pybind11":
".build/doxygenxml/"}
44breathe_default_project =
"pybind11"
45breathe_domain_by_extension = {
"h":
"cpp"}
48templates_path = [
".templates"]
63copyright =
"2017, Wenzel Jakob"
64author =
"Wenzel Jakob"
71with open(
"../pybind11/_version.py")
as f:
72 code = compile(f.read(),
"../pybind11/_version.py",
"exec")
77version = loc[
"__version__"]
94exclude_patterns = [
".build",
"release.rst"]
121todo_include_todos =
False
158html_static_path = [
"_static"]
225htmlhelp_basename =
"pybind11doc"
229latex_engine =
"pdflatex"
240 "classoptions":
",openany,oneside",
242\usepackage{fontawesome}
243\usepackage{textgreek}
244\DeclareUnicodeCharacter{00A0}{}
245\DeclareUnicodeCharacter{2194}{\faArrowsH}
246\DeclareUnicodeCharacter{1F382}{\faBirthdayCake}
247\DeclareUnicodeCharacter{1F355}{\faAdjust}
248\DeclareUnicodeCharacter{0301}{'}
249\DeclareUnicodeCharacter{03C0}{\textpi}
260 (master_doc,
"pybind11.tex",
"pybind11 Documentation",
"Wenzel Jakob",
"manual"),
288man_pages = [(master_doc,
"pybind11",
"pybind11 Documentation", [author], 1)]
303 "pybind11 Documentation",
306 "One line description of project.",
323primary_domain =
"cpp"
324highlight_language =
"cpp"
328 build_dir = os.path.join(app.confdir,
".build")
329 if not os.path.exists(build_dir):
333 subprocess.call([
"doxygen",
"--version"])
334 retcode = subprocess.call([
"doxygen"], cwd=app.confdir)
336 sys.stderr.write(f
"doxygen error code: {-retcode}\n")
338 sys.stderr.write(f
"doxygen execution failed: {e}\n")
342 with open(DIR.parent /
"README.rst")
as f:
345 if app.builder.name ==
"latex":
347 contents = contents[contents.find(
r".. start") :]
350 contents = re.sub(
r"^(.*)\n[-~]{3,}$",
r"**\1**", contents, flags=re.MULTILINE)
352 with open(DIR /
"readme.rst",
"w")
as f:
357 (DIR /
"readme.rst").unlink()
362 app.connect(
"builder-inited", generate_doxygen_xml)
365 app.connect(
"builder-inited", prepare)
368 app.connect(
"build-finished", clean_up)
def generate_doxygen_xml(app)
def clean_up(app, exception)
void exec(const str &expr, object global=globals(), object local=object())