Skip to content

Commit

Permalink
chore: avoid duplicating pins of grpcio in noxfile (#246)
Browse files Browse the repository at this point in the history
Rely on the pins in 'setup.py' as the Source of Truth.

See #234 (review)
  • Loading branch information
tseaver authored Aug 12, 2021
1 parent 258ba4a commit ffa528e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def default(session):
)

# Install all test dependencies, then install this package in-place.
session.install("mock", "pytest", "pytest-cov", "grpcio >= 1.0.2")
session.install("-e", ".", "-c", constraints_path)
session.install("mock", "pytest", "pytest-cov")
session.install("-e", ".[grpc]", "-c", constraints_path)

pytest_args = [
"python",
Expand Down Expand Up @@ -124,7 +124,7 @@ def unit_grpc_gcp(session):
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
# Install grpcio-gcp
session.install("grpcio-gcp", "-c", constraints_path)
session.install("-e", ".[grpcgcp]", "-c", constraints_path)

default(session)

Expand All @@ -141,9 +141,7 @@ def lint_setup_py(session):
@nox.session(python="3.6")
def pytype(session):
"""Run type-checking."""
session.install(
".", "grpcio >= 1.8.2", "grpcio-gcp >= 0.2.2", "pytype >= 2019.3.21"
)
session.install(".[grpc, grpcgcp]", "pytype >= 2019.3.21")
session.run("pytype")


Expand All @@ -163,8 +161,7 @@ def cover(session):
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("-e", ".[grpc, grpcgcp]")
session.install("sphinx==4.0.1", "alabaster", "recommonmark")

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

0 comments on commit ffa528e

Please sign in to comment.