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
16
noxfile.py
16
noxfile.py
@ -53,14 +53,18 @@ def docs(session: nox.Session) -> None:
|
|||||||
|
|
||||||
session.install("-r", "docs/requirements.txt")
|
session.install("-r", "docs/requirements.txt")
|
||||||
session.chdir("docs")
|
session.chdir("docs")
|
||||||
|
|
||||||
|
if "pdf" in session.posargs:
|
||||||
|
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
|
||||||
|
return
|
||||||
|
|
||||||
session.run("sphinx-build", "-M", "html", ".", "_build")
|
session.run("sphinx-build", "-M", "html", ".", "_build")
|
||||||
|
|
||||||
if session.posargs:
|
if "serve" in session.posargs:
|
||||||
if "serve" in session.posargs:
|
session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
|
||||||
print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
|
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
|
||||||
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
|
elif session.posargs:
|
||||||
else:
|
session.error("Unsupported argument to docs")
|
||||||
print("Unsupported argument to docs")
|
|
||||||
|
|
||||||
|
|
||||||
@nox.session(reuse_venv=True)
|
@nox.session(reuse_venv=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user