forked from jupyter/jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
24 lines (19 loc) · 662 Bytes
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import nox
nox.options.reuse_existing_virtualenvs = True
build_command = ["-b", "html", "docs/source", "docs/build/html"]
@nox.session(python="3.9")
def docs(session):
session.install("-r", "docs/doc-requirements.txt")
session.run("sphinx-build", *build_command)
@nox.session(name="docs-live", python="3.9")
def docs_live(session):
session.install("-r", "docs/doc-requirements.txt")
session.install("sphinx-autobuild")
AUTOBUILD_IGNORE = [
"docs/build",
]
cmd = ["sphinx-autobuild"]
for folder in AUTOBUILD_IGNORE:
cmd.extend(["--ignore", f"*/{folder}/*"])
cmd.extend(build_command)
session.run(*cmd)