コード例 #1
0
ファイル: protoc.py プロジェクト: aaronjheng/grpc
def main(command_arguments):
  """Run the protocol buffer compiler with the given command-line arguments.

  Args:
    command_arguments: a list of strings representing command line arguments to
        `protoc`.
  """
  command_arguments = [argument.encode() for argument in command_arguments]
  return _protoc_compiler.run_main(command_arguments)
コード例 #2
0
ファイル: protoc.py プロジェクト: yashykt/grpc
def main(command_arguments):
    """Run the protocol buffer compiler with the given command-line arguments.

  Args:
    command_arguments: a list of strings representing command line arguments to
        `protoc`.
  """
    command_arguments = [argument.encode() for argument in command_arguments]
    return _protoc_compiler.run_main(command_arguments)
コード例 #3
0
ファイル: protoc.py プロジェクト: NVoronchev/grpc
def main(command_arguments, include_module_proto=True):
    """Run the protocol buffer compiler with the given command-line arguments.

  Args:
    command_arguments: A list of strings representing command line arguments to
        `protoc`.
    include_module_proto: Wether `*.proto` files comming with the current py-module
        will be included too.
  """
    if include_module_proto:
        proto_include = pkg_resources.resource_filename('grpc_tools', '_proto')
        command_arguments.append('-I{}'.format(proto_include))

    command_arguments = [os.path.abspath(__file__)] + command_arguments
    command_arguments = [argument.encode() for argument in command_arguments]
    return _protoc_compiler.run_main(command_arguments)