19 from pathlib
import Path
21 DIR = Path(__file__).parent.resolve()
39 "sphinxcontrib.rsvgconverter",
40 "sphinxcontrib.moderncmakedomain",
43 breathe_projects = {
"pybind11":
".build/doxygenxml/"}
44 breathe_default_project =
"pybind11" 45 breathe_domain_by_extension = {
"h":
"cpp"}
48 templates_path = [
".templates"]
53 source_suffix =
".rst" 63 copyright =
"2017, Wenzel Jakob" 64 author =
"Wenzel Jakob" 71 with open(
"../pybind11/_version.py")
as f:
72 code = compile(f.read(),
"../pybind11/_version.py",
"exec")
77 version = loc[
"__version__"]
94 exclude_patterns = [
".build",
"release.rst"]
121 todo_include_todos =
False 158 html_static_path = [
"_static"]
225 htmlhelp_basename =
"pybind11doc" 229 latex_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"),
288 man_pages = [(master_doc,
"pybind11",
"pybind11 Documentation", [author], 1)]
299 texinfo_documents = [
303 "pybind11 Documentation",
306 "One line description of project.",
323 primary_domain =
"cpp" 324 highlight_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()
363 app.connect(
"builder-inited", generate_doxygen_xml)
366 app.connect(
"builder-inited", prepare)
369 app.connect(
"build-finished", clean_up)
def generate_doxygen_xml(app)
void exec(const str &expr, object global=globals(), object local=object())
def clean_up(app, exception)