From cef8fba2eb969aac2e8119fab895e665bbc0e098 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 27 Jul 2021 17:29:06 -0400 Subject: [PATCH] chore: use Python 3.8 for docs / docfx sessions (#125) Works around recent changes to the Kokoro 'docs-presubmt' configuration. See: https://github.com/googleapis/python-api-core/pull/224 Also, pin sphinx version (`docs` / `docfx`) and use 'gcp-sphinx-docfx-yaml' (`docfx`). --- noxfile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index 5eb9229..cf7ba7c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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( @@ -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(