def __init__(self, *args, **kwargs): """Generates Java files from .proto files using the Google protobuf compiler.""" super(ProtobufGen, self).__init__(*args, **kwargs) self.plugins = self.get_options().plugins self._extra_paths = self.get_options().extra_path self.protobuf_binary = BinaryUtil.from_options( self.get_options()).select_binary('protoc')
def select_thrift_binary(options): """Selects a thrift compiler binary matching the current os and architecture. :param Options options: options for the current task Defaults to the thrift compiler version specified in the gen.thrift options scope. """ return BinaryUtil.from_options(options).select_binary('thrift')
def __init__(self, *args, **kwargs): """Generates Java and Python files from .proto files using the Google protobuf compiler.""" super(ProtobufGen, self).__init__(*args, **kwargs) self.plugins = self.get_options().plugins self._extra_paths = self.get_options().extra_path self.java_out = os.path.join(self.workdir, 'gen-java') self.py_out = os.path.join(self.workdir, 'gen-py') self.gen_langs = set(self.get_options().lang) for lang in ('java', 'python'): if self.context.products.isrequired(lang): self.gen_langs.add(lang) self.protobuf_binary = BinaryUtil.from_options(self.get_options()).select_binary('protoc')
def __init__(self, *args, **kwargs): """Generates Java files from .proto files using the Google protobuf compiler.""" super(ProtobufGen, self).__init__(*args, **kwargs) self.plugins = self.get_options().plugins self._extra_paths = self.get_options().extra_path self.protobuf_binary = BinaryUtil.from_options(self.get_options()).select_binary('protoc')
def ragel_binary(self): if self._ragel_binary is None: self._ragel_binary = BinaryUtil.from_options(self.get_options()).select_binary("ragel") return self._ragel_binary
def ragel_binary(self): if self._ragel_binary is None: self._ragel_binary = BinaryUtil.from_options( self.get_options()).select_binary('ragel') return self._ragel_binary