14 """Provides distutils command classes for the GRPC Python setup process."""
21 ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
22 HEALTH_PROTO = os.path.join(ROOT_DIR,
'../../proto/grpc/health/v1/health.proto')
23 LICENSE = os.path.join(ROOT_DIR,
'../../../LICENSE')
27 """Command to copy proto modules from grpc/src/proto and LICENSE from
40 if os.path.isfile(HEALTH_PROTO):
43 os.path.join(ROOT_DIR,
'grpc_health/v1/health.proto'))
44 if os.path.isfile(LICENSE):
45 shutil.copyfile(LICENSE, os.path.join(ROOT_DIR,
'LICENSE'))
49 """Command to generate project *_pb2.py modules from proto files."""
51 description =
'build grpc protobuf modules'
65 from grpc_tools
import command
66 command.build_package_protos(self.distribution.package_dir[
''])