Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Aug 14, 2024
1 parent 6370e59 commit b1ff318
Showing 1 changed file with 2 additions and 83 deletions.
85 changes: 2 additions & 83 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


BLACK_VERSION = "black==22.3.0"
LINT_PATHS = ["docs", "google", "noxfile.py", "setup.py"]
LINT_PATHS = ["google", "noxfile.py", "setup.py"]


# `grpcio-tools` 1.59.0 or newer is required for protobuf 5.x compatibility.
Expand Down Expand Up @@ -197,7 +197,7 @@ def unit_remote(session, library, prerelease, protobuf_implementation):
external=True,
)

downstream_dir = repository
downstream_dir = f"{working_dir}/{repository}"
if package:
downstream_dir = f"{working_dir}/{repository}/packages/{package}"

Expand Down Expand Up @@ -343,87 +343,6 @@ def generate_protos(session):
)


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

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"sphinx==4.5.0",
"alabaster",
"recommonmark",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-W", # warnings as errors
"-T", # show full traceback on exception
"-N", # no colors
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)


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

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-T", # show full traceback on exception
"-N", # no colors
"-D",
(
"extensions=sphinx.ext.autodoc,"
"sphinx.ext.autosummary,"
"docfx_yaml.extension,"
"sphinx.ext.intersphinx,"
"sphinx.ext.coverage,"
"sphinx.ext.napoleon,"
"sphinx.ext.todo,"
"sphinx.ext.viewcode,"
"recommonmark"
),
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)


@nox.session(python="3.8")
def lint(session):
"""Run linters.
Expand Down

0 comments on commit b1ff318

Please sign in to comment.