Files
trailofbits-buttercup/protoc.sh
T
Riccardo Schirone f9d5073c6e ci: switch protobuf generation to grpcio-tools
Use grpcio-tools from the common venv instead of system protoc for
consistent protobuf code generation across development and CI.

Changes:
- Update protoc.sh to use `python -m grpc_tools.protoc`
- Add grpcio-tools ~=1.73.1 to common dev dependencies
- Update check-protobuf CI job to run from common venv
- Regenerate msg_pb2.py and msg_pb2.pyi with new tooling
- Document protobuf generation requirement in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:06:33 +01:00

15 lines
560 B
Bash
Executable File

#!/usr/bin/env bash
# Generate protobuf files using grpcio-tools from the common venv.
# MUST be run from within the common venv: cd common && uv run ../protoc.sh
set -euo pipefail
localpath="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P )"
echo "$localpath"
echo "$localpath/common/protos"
python -m grpc_tools.protoc \
--pyi_out="$localpath/common/src/buttercup/common/datastructures/" \
--python_out="$localpath/common/src/buttercup/common/datastructures/" \
-I"$localpath/common/protos" \
"$localpath"/common/protos/*.proto