1 python_binary_host { 2 name: "protoc-gen-nanopb", 3 main: "nanopb_generator.py", 4 srcs: [ 5 "nanopb_generator.py", 6 "proto/nanopb.proto", 7 "proto/plugin.proto", 8 ], 9 proto: { 10 canonical_path_from_root: false, 11 include_dirs: ["external/protobuf/src"], 12 }, 13 libs: ["libprotobuf-python"], 14 version: { 15 py2: { 16 enabled: true, 17 embedded_launcher: true, 18 }, 19 py3: { 20 enabled: false, 21 }, 22 }, 23 } 24