mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
chore: support PDF from nox (#3121)
This commit is contained in:
parent
55f6f6e9bf
commit
1b10292c05
12
noxfile.py
12
noxfile.py
@ -53,14 +53,18 @@ def docs(session: nox.Session) -> None:
|
||||
|
||||
session.install("-r", "docs/requirements.txt")
|
||||
session.chdir("docs")
|
||||
|
||||
if "pdf" in session.posargs:
|
||||
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
|
||||
return
|
||||
|
||||
session.run("sphinx-build", "-M", "html", ".", "_build")
|
||||
|
||||
if session.posargs:
|
||||
if "serve" in session.posargs:
|
||||
print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
|
||||
session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
|
||||
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
|
||||
else:
|
||||
print("Unsupported argument to docs")
|
||||
elif session.posargs:
|
||||
session.error("Unsupported argument to docs")
|
||||
|
||||
|
||||
@nox.session(reuse_venv=True)
|
||||
|
Loading…
Reference in New Issue
Block a user