Skip to content

Commit

Permalink
chore: use Python 3.8 for docs / docfx sessions (#125)
Browse files Browse the repository at this point in the history
Works around recent changes to the Kokoro 'docs-presubmt' configuration.

See: googleapis/python-api-core#224

Also, pin sphinx version (`docs` / `docfx`) and use 'gcp-sphinx-docfx-yaml' (`docfx`).
  • Loading branch information
tseaver committed Jul 27, 2021
1 parent f6584bc commit cef8fba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def cover(session):
session.run("coverage", "erase")


@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.session(python="3.8")
def docs(session):
"""Build the docs for this library."""

session.install(".", "grpcio >= 1.8.2", "grpcio-gcp >= 0.2.2")
session.install("-e", ".")
session.install("sphinx", "alabaster", "recommonmark")
session.install("sphinx==4.0.1", "alabaster", "recommonmark")

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand All @@ -129,12 +129,14 @@ def docs(session):
)


@nox.session(python=DEFAULT_PYTHON_VERSION)
@nox.session(python="3.8")
def docfx(session):
"""Build the docfx yaml files for this library."""

session.install("-e", ".")
session.install("sphinx", "alabaster", "recommonmark", "sphinx-docfx-yaml")
session.install(
"sphinx==4.0.1", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand Down

0 comments on commit cef8fba

Please sign in to comment.