From 2fd412c4bf8a03003c8c2a3ddbbec38a3be9c462 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 9 Sep 2020 18:23:04 +0000 Subject: [PATCH] chore(python-library): use sphinx 1.5.5 for the docfx job Originally tested at: https://github.com/googleapis/python-texttospeech/pull/89 This change will fix the missing docstring in the yaml files. --- synthtool/gcp/templates/python_library/docs/conf.py.j2 | 2 +- synthtool/gcp/templates/python_library/noxfile.py.j2 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/synthtool/gcp/templates/python_library/docs/conf.py.j2 b/synthtool/gcp/templates/python_library/docs/conf.py.j2 index 654292bc6..6ce53ce77 100644 --- a/synthtool/gcp/templates/python_library/docs/conf.py.j2 +++ b/synthtool/gcp/templates/python_library/docs/conf.py.j2 @@ -29,7 +29,7 @@ __version__ = "{{ metadata['version'] }}" # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "1.6.3" +needs_sphinx = "1.5.5" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom diff --git a/synthtool/gcp/templates/python_library/noxfile.py.j2 b/synthtool/gcp/templates/python_library/noxfile.py.j2 index a9275496e..5c9ac730c 100644 --- a/synthtool/gcp/templates/python_library/noxfile.py.j2 +++ b/synthtool/gcp/templates/python_library/noxfile.py.j2 @@ -194,7 +194,9 @@ def docfx(session): """Build the docfx yaml files for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark", "sphinx-docfx-yaml") + # sphinx-docfx-yaml supports up to sphinx version 1.5.5. + # https://github.com/docascode/sphinx-docfx-yaml/issues/97 + session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run(