1#!/bin/bash -e 2# 3# Copyright 2021 The ChromiumOS Authors 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6# 7# Generates python proto bindings that include the grpc bindings. 8 9readonly script_dir="$(dirname "$(realpath -e "${BASH_SOURCE[0]}")")" 10 11cd "${script_dir}" 12 13echo "Generating proto and grpc bindings" 14find proto/ -type f -name '*_service.proto' -exec \ 15vpython3 -m grpc_tools.protoc \ 16 -Iproto \ 17 --python_out=python \ 18 --grpc_python_out=python \ 19 {} + 20