From 680fe65b23eec228a7674a6c674ed9a87ce93427 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Sat, 13 Aug 2022 22:33:21 +0100 Subject: [PATCH] two python projects: fix protobuf install (#8246) --- projects/g-api-py-api-common-protos/build.sh | 14 ++++++-------- projects/protobuf-python/build.sh | 13 +++++-------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/projects/g-api-py-api-common-protos/build.sh b/projects/g-api-py-api-common-protos/build.sh index e183ef8ae..041626e32 100644 --- a/projects/g-api-py-api-common-protos/build.sh +++ b/projects/g-api-py-api-common-protos/build.sh @@ -18,22 +18,20 @@ # Build protoc with default options. unset CFLAGS CXXFLAGS mkdir $SRC/protobuf-install/ -cd $SRC/protobuf/ -./autogen.sh -./configure --prefix=$SRC/protobuf-install +cd $SRC/protobuf-install/ +cmake -Dprotobuf_BUILD_TESTS=OFF $SRC/protobuf make -j$(nproc) make install -export PROTOC="$SRC/protobuf-install/bin/protoc" - ldconfig -cd python -python3 setup.py build --cpp_implementation + +cd $SRC/protobuf/python +python3 setup.py build pip3 install . # Compile .proto specs cd $SRC/python-api-common-protos/ for target in quota billing service routing log; do - $PROTOC --python_out=. --proto_path=. google/api/$target.proto + protoc --python_out=. --proto_path=. google/api/$target.proto done # Compile fuzzer diff --git a/projects/protobuf-python/build.sh b/projects/protobuf-python/build.sh index 8fdd9b8fd..d03077bb0 100644 --- a/projects/protobuf-python/build.sh +++ b/projects/protobuf-python/build.sh @@ -18,21 +18,18 @@ # Build protoc with default options. unset CFLAGS CXXFLAGS mkdir $SRC/protobuf-install/ -cd $SRC/protobuf/ -./autogen.sh -./configure --prefix=$SRC/protobuf-install +cmake $SRC/protobuf -Dprotobuf_BUILD_TESTS=OFF make -j$(nproc) make install -export PROTOC="$SRC/protobuf-install/bin/protoc" - ldconfig -cd python -python3 setup.py build --cpp_implementation + +cd $SRC/protobuf/python +python3 setup.py build pip3 install . # Compile test protos with protoc. cd $SRC/ -$PROTOC --python_out=. --proto_path=. test-full.proto +protoc --python_out=. --proto_path=. test-full.proto # Build fuzzers in $OUT. for fuzzer in $(find $SRC -name 'fuzz_*.py'); do