Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/python/grpcio/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
"""Provides nox command classes for the GRPC Python setup process."""

import glob
import nox
import os
import os.path
import shutil

import nox

PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
GRPC_STEM = os.path.abspath(PYTHON_STEM + "../../../../")
GRPC_ROOT = os.path.relpath(GRPC_STEM, start=GRPC_STEM)
Expand All @@ -28,6 +29,7 @@
class CommandError(Exception):
"""Simple exception class for GRPC custom commands."""


@nox.session
def doc(session: nox.Session):
"""Session to generate documentation via sphinx."""
Expand All @@ -44,9 +46,8 @@ def doc(session: nox.Session):
["-b", "html", "-W", "--keep-going", source_dir, target_dir]
)
if exit_code != 0:
raise CommandError(
"Documentation generation has warnings or errors"
)
raise CommandError("Documentation generation has warnings or errors")


@nox.session
def clean(session: nox.Session):
Expand All @@ -70,9 +71,7 @@ def clean(session: nox.Session):
abs_paths = glob.glob(this_glob)
for path in abs_paths:
if not str(path).startswith(_CURRENT_DIRECTORY):
raise ValueError(
"Cowardly refusing to delete {}.".format(path)
)
raise ValueError("Cowardly refusing to delete {}.".format(path))
print("Removing {}".format(os.path.relpath(path)))
if os.path.isfile(path):
os.remove(str(path))
Expand Down
4 changes: 3 additions & 1 deletion src/python/grpcio_channelz/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
# limitations under the License.
"""Provides nox command classes for the GRPC Python setup process."""

import nox
import os
import shutil

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
GRPC_ROOT_ABS_PATH = os.path.join(ROOT_DIR, "../../..")
ROOT_REL_DIR = os.path.relpath(ROOT_DIR, start=GRPC_ROOT_ABS_PATH)
CHANNELZ_PROTO = "src/proto/grpc/channelz/channelz.proto"
LICENSE = "./LICENSE"


@nox.session
def preprocess(session: nox.Session):
"""
Expand Down
4 changes: 3 additions & 1 deletion src/python/grpcio_health_checking/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
# limitations under the License.
"""Provides nox command classes for the GRPC Python setup process."""

import nox
import os
import shutil

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
GRPC_ROOT_ABS_PATH = os.path.join(ROOT_DIR, "../../..")
ROOT_REL_DIR = os.path.relpath(ROOT_DIR, start=GRPC_ROOT_ABS_PATH)
HEALTH_PROTO = "src/proto/grpc/health/v1/health.proto"
LICENSE = "./LICENSE"


@nox.session
def preprocess(session: nox.Session):
"""
Expand Down
1 change: 0 additions & 1 deletion src/python/grpcio_health_checking/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import grpc_version
import python_version


CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand Down
3 changes: 2 additions & 1 deletion src/python/grpcio_reflection/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
# limitations under the License.
"""Provides nox command classes for the GRPC Python setup process."""

import nox
import os
import shutil

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
GRPC_ROOT_ABS_PATH = os.path.join(ROOT_DIR, "../../..")
ROOT_REL_DIR = os.path.relpath(ROOT_DIR, start=GRPC_ROOT_ABS_PATH)
Expand Down
1 change: 0 additions & 1 deletion src/python/grpcio_reflection/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import grpc_version
import python_version


CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand Down
6 changes: 4 additions & 2 deletions src/python/grpcio_status/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
# limitations under the License.
"""Provides nox command classes for the GRPC Python setup process."""

import nox
import os
import shutil

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
GRPC_ROOT_ABS_PATH = os.path.join(ROOT_DIR, "../../..")
STATUS_PROTO = "third_party/googleapis/google/rpc/status.proto"
ROOT_REL_DIR = os.path.relpath(ROOT_DIR, start=GRPC_ROOT_ABS_PATH)
PACKAGE_STATUS_PROTO_PATH = "grpc_status/google/rpc"
LICENSE = "./LICENSE"


@nox.session
def preprocess(session: nox.Session):
"""
Expand All @@ -47,6 +49,6 @@ def preprocess(session: nox.Session):

@nox.session
def build_package_protos(session: nox.Session):
""" NoOp Session """
"""NoOp Session"""
session.log("Running no-op build_package_protos for grpcio-status...")
pass
1 change: 0 additions & 1 deletion src/python/grpcio_status/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import grpc_version
import python_version


CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
Expand Down
4 changes: 3 additions & 1 deletion src/python/grpcio_testing/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
# limitations under the License.
"""Provides nox command classes for the GRPC Python setup process."""

import nox
import os
import shutil

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
GRPC_ROOT_ABS_PATH = os.path.join(ROOT_DIR, "../../..")
ROOT_REL_DIR = os.path.relpath(ROOT_DIR, start=GRPC_ROOT_ABS_PATH)
LICENSE = "./LICENSE"


@nox.session
def preprocess(session: nox.Session):
"""
Expand Down
1 change: 0 additions & 1 deletion src/python/grpcio_testing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import grpc_version
import python_version


INSTALL_REQUIRES = (
"protobuf>=6.31.1,<7.0.0",
"grpcio>={version}".format(version=grpc_version.VERSION),
Expand Down
1 change: 1 addition & 0 deletions tools/distrib/python/grpcio_tools/grpc_tools/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import sys

from grpc_tools import protoc

# import setuptools

if sys.version_info >= (3, 9, 0):
Expand Down
7 changes: 3 additions & 4 deletions tools/distrib/python/grpcio_tools/grpc_tools/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"""Provides nox command classes for the GRPC Python setup process."""

import argparse
import nox
import os

import nox

ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))


Expand Down Expand Up @@ -45,6 +46,4 @@ def build_package_protos(session: nox.Session):
# which is the same directory as the pyproject.toml file
from . import command

command.build_package_protos(
os.path.join(ROOT_DIR, ".."), args.strict_mode
)
command.build_package_protos(os.path.join(ROOT_DIR, ".."), args.strict_mode)