Functions | Variables
build Namespace Reference

Functions

def add_test_import (str proto_package_path, str file_name, bool service=False)
 
None compile_protos (str proto_root, str sub_dir='.')
 
None create_init_file (str path, str package_path="")
 
bool has_grpc_service (str proto_package_path)
 
def main ()
 

Variables

list COMPILE_BOTH = COMPILE_PROTO_ONLY + ['--grpc_python_out={}'.format(OUTPUT_PATH)]
 
list COMPILE_PROTO_ONLY
 
list EXCLUDE_PROTO_PACKAGES_LIST
 
 GOOGLEAPIS_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'googleapis')
 
 GRPC_ROOT = os.path.abspath(os.path.join(WORK_DIR, '..', '..', '..', '..'))
 
list NAMESPACE_PACKAGES = ["google"]
 
 OPENCENSUS_PROTO_ROOT
 
 OPENTELEMETRY_PROTO_ROOT
 
 OUTPUT_PATH = WORK_DIR
 
string PKGUTIL_STYLE_INIT = "__path__ = __import__('pkgutil').extend_path(__path__, __name__)\n"
 
string TEST_FILE_NAME = 'generated_file_import_test.py'
 
list TEST_IMPORTS = []
 
 UDPA_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'udpa')
 
 VALIDATE_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'protoc-gen-validate')
 
 WELL_KNOWN_PROTOS_INCLUDE
 
 WORK_DIR = os.path.dirname(os.path.abspath(__file__))
 
 XDS_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'envoy-api')
 

Function Documentation

◆ add_test_import()

def build.add_test_import ( str  proto_package_path,
str  file_name,
bool   service = False 
)

Definition at line 54 of file build.py.

◆ compile_protos()

None build.compile_protos ( str  proto_root,
str   sub_dir = '.' 
)

Definition at line 83 of file build.py.

◆ create_init_file()

None build.create_init_file ( str  path,
str   package_path = "" 
)

Definition at line 106 of file build.py.

◆ has_grpc_service()

bool build.has_grpc_service ( str  proto_package_path)

Definition at line 79 of file build.py.

◆ main()

def build.main ( )

Definition at line 115 of file build.py.

Variable Documentation

◆ COMPILE_BOTH

list build.COMPILE_BOTH = COMPILE_PROTO_ONLY + ['--grpc_python_out={}'.format(OUTPUT_PATH)]

Definition at line 76 of file build.py.

◆ COMPILE_PROTO_ONLY

list build.COMPILE_PROTO_ONLY
Initial value:
1 = [
2  'grpc_tools.protoc',
3  '--proto_path={}'.format(XDS_PROTO_ROOT),
4  '--proto_path={}'.format(UDPA_PROTO_ROOT),
5  '--proto_path={}'.format(GOOGLEAPIS_ROOT),
6  '--proto_path={}'.format(VALIDATE_ROOT),
7  '--proto_path={}'.format(WELL_KNOWN_PROTOS_INCLUDE),
8  '--proto_path={}'.format(OPENCENSUS_PROTO_ROOT),
9  '--proto_path={}'.format(OPENTELEMETRY_PROTO_ROOT),
10  '--python_out={}'.format(OUTPUT_PATH),
11 ]

Definition at line 65 of file build.py.

◆ EXCLUDE_PROTO_PACKAGES_LIST

list build.EXCLUDE_PROTO_PACKAGES_LIST
Initial value:
1 = [
2  # Requires extra dependency to Prometheus protos
3  'envoy/service/metrics/v2',
4  'envoy/service/metrics/v3',
5  'envoy/service/metrics/v4alpha',
6 ]

Definition at line 23 of file build.py.

◆ GOOGLEAPIS_ROOT

build.GOOGLEAPIS_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'googleapis')

Definition at line 35 of file build.py.

◆ GRPC_ROOT

build.GRPC_ROOT = os.path.abspath(os.path.join(WORK_DIR, '..', '..', '..', '..'))

Definition at line 32 of file build.py.

◆ NAMESPACE_PACKAGES

list build.NAMESPACE_PACKAGES = ["google"]

Definition at line 51 of file build.py.

◆ OPENCENSUS_PROTO_ROOT

build.OPENCENSUS_PROTO_ROOT
Initial value:
1 = os.path.join(GRPC_ROOT, 'third_party',
2  'opencensus-proto', 'src')

Definition at line 37 of file build.py.

◆ OPENTELEMETRY_PROTO_ROOT

build.OPENTELEMETRY_PROTO_ROOT
Initial value:
1 = os.path.join(GRPC_ROOT, 'third_party',
2  'opentelemetry')

Definition at line 39 of file build.py.

◆ OUTPUT_PATH

build.OUTPUT_PATH = WORK_DIR

Definition at line 43 of file build.py.

◆ PKGUTIL_STYLE_INIT

string build.PKGUTIL_STYLE_INIT = "__path__ = __import__('pkgutil').extend_path(__path__, __name__)\n"

Definition at line 50 of file build.py.

◆ TEST_FILE_NAME

string build.TEST_FILE_NAME = 'generated_file_import_test.py'

Definition at line 46 of file build.py.

◆ TEST_IMPORTS

list build.TEST_IMPORTS = []

Definition at line 47 of file build.py.

◆ UDPA_PROTO_ROOT

build.UDPA_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'udpa')

Definition at line 34 of file build.py.

◆ VALIDATE_ROOT

build.VALIDATE_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'protoc-gen-validate')

Definition at line 36 of file build.py.

◆ WELL_KNOWN_PROTOS_INCLUDE

build.WELL_KNOWN_PROTOS_INCLUDE
Initial value:
1 = pkg_resources.resource_filename(
2  'grpc_tools', '_proto')

Definition at line 41 of file build.py.

◆ WORK_DIR

build.WORK_DIR = os.path.dirname(os.path.abspath(__file__))

Definition at line 31 of file build.py.

◆ XDS_PROTO_ROOT

build.XDS_PROTO_ROOT = os.path.join(GRPC_ROOT, 'third_party', 'envoy-api')

Definition at line 33 of file build.py.

http2_test_server.format
format
Definition: http2_test_server.py:118


grpc
Author(s):
autogenerated on Fri May 16 2025 03:02:58