Skip to content

Commit 6f35de9

Browse files
luoyuxiaclaude
andcommitted
ci: use grpcio-tools for protoc in manylinux containers
Revert protox approach and use grpcio-tools to install protoc in manylinux containers. Only install when manylinux is used (not needed for Linux host builds). Changes: - Revert build.rs to use prost-build with protoc - Revert Cargo.toml to prost-build 0.14 - Add protoc installation via grpcio-tools for manylinux containers only Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 57fb6bb commit 6f35de9

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/release_python.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ jobs:
5252
- name: Generate Python README
5353
run: python bindings/python/generate_readme.py
5454

55+
- name: Install protoc via grpcio-tools (manylinux)
56+
if: matrix.manylinux != ''
57+
run: |
58+
pip install grpcio-tools
59+
PROTOC=$(python -c "import grpc_tools, os; print(os.path.join(os.path.dirname(grpc_tools.__file__), 'protoc'))")
60+
echo "PROTOC=$PROTOC" >> $GITHUB_ENV
61+
5562
- uses: PyO3/maturin-action@v1
5663
with:
5764
working-directory: bindings/python
@@ -81,6 +88,13 @@ jobs:
8188
- name: Generate Python README
8289
run: python3 bindings/python/generate_readme.py
8390

91+
- name: Install protoc via grpcio-tools (manylinux)
92+
if: matrix.manylinux != ''
93+
run: |
94+
pip install grpcio-tools
95+
PROTOC=$(python -c "import grpc_tools, os; print(os.path.join(os.path.dirname(grpc_tools.__file__), 'protoc'))")
96+
echo "PROTOC=$PROTOC" >> $GITHUB_ENV
97+
8498
- uses: PyO3/maturin-action@v1
8599
with:
86100
working-directory: bindings/python

crates/fluss/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,4 @@ test-env-helpers = "0.2.2"
8282

8383

8484
[build-dependencies]
85-
prost-build = { version = "0.12" }
86-
prost-types = "0.12"
87-
protox = "0.6.0"
85+
prost-build = { version = "0.14" }

crates/fluss/build.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,11 @@
1818
use std::io::Result;
1919

2020
fn main() -> Result<()> {
21-
// Use protox to parse proto files (pure Rust, no protoc needed)
22-
let file_descriptor_set = protox::compile(&["src/proto/fluss_api.proto"],&["src/proto"])
23-
.expect("Failed to parse proto files");
24-
2521
let mut config = prost_build::Config::new();
2622
config.bytes([
2723
".proto.PbProduceLogReqForBucket.records",
2824
".proto.PbPutKvReqForBucket.records",
2925
]);
30-
31-
// Compile using the parsed file descriptor set
32-
config
33-
.compile_fds(file_descriptor_set)
34-
.expect("Failed to compile proto files");
35-
26+
config.compile_protos(&["src/proto/fluss_api.proto"], &["src/proto"])?;
3627
Ok(())
3728
}

0 commit comments

Comments
 (0)