MCPcopy Create free account
hub / github.com/pybind/pybind11 / docs

Function docs

noxfile.py:65–95  ·  view source on GitHub ↗

Build the docs. Pass --non-interactive to avoid serving.

(session: nox.Session)

Source from the content-addressed store, hash-verified

63
64@nox.session(reuse_venv=True, default=False)
65def docs(session: nox.Session) -> None:
66 """
67 Build the docs. Pass --non-interactive to avoid serving.
68 """
69
70 parser = argparse.ArgumentParser()
71 parser.add_argument(
72 "-b", dest="builder", default="html", help="Build target (default: html)"
73 )
74 args, posargs = parser.parse_known_args(session.posargs)
75 serve = args.builder == "html" and session.interactive
76
77 extra_installs = ["sphinx-autobuild"] if serve else []
78 session.install("-r", "docs/requirements.txt", *extra_installs)
79 session.chdir("docs")
80
81 shared_args = (
82 "-n", # nitpicky mode
83 "-T", # full tracebacks
84 f"-b={args.builder}",
85 ".",
86 f"_build/{args.builder}",
87 *posargs,
88 )
89
90 if serve:
91 session.run(
92 "sphinx-autobuild", "--open-browser", "--ignore=.build", *shared_args
93 )
94 else:
95 session.run("sphinx-build", "--keep-going", *shared_args)
96
97
98@nox.session(reuse_venv=True, default=False)

Callers

nothing calls this directly

Calls 2

installMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected