Skip to content
Snippets Groups Projects
Verified Commit 8cba867d authored by loqs's avatar loqs
Browse files

Fix grpcio-tools with protobuf 30

- Include protobuf source and check version matches protobuf package.
- Add protobuf source location to grpcio_tools GRPC_PYTHON_CFLAGS.
- Fixes #6.
parent d7c10b74
No related branches found
Tags 2.17.6-1
1 merge request!3Fix grpcio-tools with protobuf 30
......@@ -24,8 +24,10 @@ pkgbase = grpc
makedepends = re2c
source = https://github.com/grpc/grpc/archive/v1.71.0/grpc-1.71.0.tar.gz
source = https://github.com/google/googletest/archive/2dd1c131950043a8ad5ab0d2dda0e0970596586a/googletest-2dd1c131950043a8ad5ab0d2dda0e0970596586a.tar.gz
source = https://github.com/protocolbuffers/protobuf/archive/v30.0/protobuf-30.0.tar.gz
sha256sums = 0d631419e54ec5b29def798623ee3bf5520dac77abeab3284ef7027ec2363f91
sha256sums = 31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109
sha256sums = 9df0e9e8ebe39f4fbbb9cf7db3d811287fe3616b2f191eb2bf5eaa12539c881f
pkgname = grpc
depends = glibc
......
......@@ -7,6 +7,7 @@ pkgbase='grpc'
pkgname=('grpc' 'python-grpcio' 'python-grpcio-tools' 'php-grpc' 'php-legacy-grpc' 'grpc-cli')
pkgver=1.71.0
_gtestver=2dd1c131950043a8ad5ab0d2dda0e0970596586a
_protover=30.0
pkgrel=1
pkgdesc="High performance, open source, general RPC framework that puts mobile and HTTP/2 first."
arch=('x86_64')
......@@ -32,9 +33,11 @@ makedepends=(
're2c'
)
source=("https://github.com/grpc/grpc/archive/v$pkgver/$pkgbase-$pkgver.tar.gz"
"https://github.com/google/googletest/archive/$_gtestver/googletest-$_gtestver.tar.gz")
"https://github.com/google/googletest/archive/$_gtestver/googletest-$_gtestver.tar.gz"
"https://github.com/protocolbuffers/protobuf/archive/v$_protover/protobuf-$_protover.tar.gz")
sha256sums=('0d631419e54ec5b29def798623ee3bf5520dac77abeab3284ef7027ec2363f91'
'31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109')
'31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109'
'9df0e9e8ebe39f4fbbb9cf7db3d811287fe3616b2f191eb2bf5eaa12539c881f')
prepare() {
cd "$srcdir/$pkgbase-$pkgver"
......@@ -55,6 +58,11 @@ prepare() {
-e '/^PROTOBUF_SUBMODULE_VERSION=/d' \
tools/distrib/python/grpcio_tools/protoc_lib_deps.py
ln -s ../../../.. tools/distrib/python/grpcio_tools/grpc_root
if ! pkgconf protobuf --exact-version=$_protover.0; then
echo "protobuf version mismatch"
exit 1
fi
}
build() {
......@@ -119,7 +127,7 @@ build() {
# grpcio-tools
cd tools/distrib/python/grpcio_tools
GRPC_PYTHON_CFLAGS="-fno-wrapv -frtti $(pkg-config --cflags protobuf)" \
GRPC_PYTHON_CFLAGS="-fno-wrapv -frtti $(pkg-config --cflags protobuf) -I$srcdir/protobuf-$_protover/src" \
GRPC_PYTHON_LDFLAGS="$(pkg-config --libs protobuf) -lprotoc" \
python -m build --wheel --no-isolation
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment