buildifier the file

reviewable/pr883/r1
Jisi Liu 10 years ago
parent 39362b35b2
commit ee8131a62f
  1. 25
      protobuf.bzl

@ -1,6 +1,5 @@
# -*- mode: python; -*- PYTHON-PREPROCESSING-REQUIRED # -*- mode: python; -*- PYTHON-PREPROCESSING-REQUIRED
def _gen_dir(ctx): def _gen_dir(ctx):
if not ctx.attr.prefix: if not ctx.attr.prefix:
return ctx.label.package return ctx.label.package
@ -49,17 +48,21 @@ def _proto_srcs_impl(ctx):
) )
_proto_srcs = rule( _proto_srcs = rule(
implementation = _proto_srcs_impl,
output_to_genfiles = True,
attrs = { attrs = {
"srcs": attr.label_list(allow_files=True), "srcs": attr.label_list(allow_files = True),
"deps": attr.label_list(providers=["proto"]), "deps": attr.label_list(providers = ["proto"]),
"prefix": attr.string(), "prefix": attr.string(),
"protoc": attr.label(executable=True, single_file=True, mandatory=True), "protoc": attr.label(
"gen_cc": attr.bool(), executable = True,
"gen_py": attr.bool(), single_file = True,
"outs": attr.output_list() mandatory = True,
} ),
"gen_cc": attr.bool(),
"gen_py": attr.bool(),
"outs": attr.output_list(),
},
output_to_genfiles = True,
implementation = _proto_srcs_impl,
) )
def cc_proto_library( def cc_proto_library(

Loading…
Cancel
Save