mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
f9d5073c6e
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>
15 lines
560 B
Bash
Executable File
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
|