docs: rework CI a bit, more modern skipping (#3424)

* docs: rework CI a bit, more modern skipping

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Henry Schreiner
2021-11-10 12:13:10 -05:00
committed by GitHub
parent b11ff912a6
commit aebd21b53c
5 changed files with 19 additions and 24 deletions

View File

@@ -57,10 +57,10 @@ def docs(session: nox.Session) -> None:
session.chdir("docs")
if "pdf" in session.posargs:
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
session.run("sphinx-build", "-b", "latexpdf", ".", "_build")
return
session.run("sphinx-build", "-M", "html", ".", "_build")
session.run("sphinx-build", "-b", "html", ".", "_build")
if "serve" in session.posargs:
session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
@@ -86,6 +86,8 @@ def build(session: nox.Session) -> None:
session.install("build")
session.log("Building normal files")
session.run("python", "-m", "build")
session.run("python", "-m", "build", *session.posargs)
session.log("Building pybind11-global files (PYBIND11_GLOBAL_SDIST=1)")
session.run("python", "-m", "build", env={"PYBIND11_GLOBAL_SDIST": "1"})
session.run(
"python", "-m", "build", *session.posargs, env={"PYBIND11_GLOBAL_SDIST": "1"}
)