New package: python3-grpcio-1.32.0

This commit is contained in:
Andrew J. Hesford 2020-09-21 13:57:40 -04:00 committed by Andrew J. Hesford
parent ce7a1cb5a3
commit 964534e9a8
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,50 @@
# Template file for 'python3-grpcio'
pkgname=python3-grpcio
version=1.32.0
revision=1
wrksrc="${pkgname#*-}-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-six"
makedepends="python3-devel zlib-devel c-ares-devel libressl-devel"
depends="python3-six"
short_desc="HTTP/2-based gRPC framework for Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="Apache-2.0"
homepage="https://grpc.io"
distfiles="${PYPI_SITE}/g/grpcio/grpcio-${version}.tar.gz"
checksum=01d3046fe980be25796d368f8fc5ff34b7cf5e1444f3789a017a7fe794465639
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
fi
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
post_patch() {
if [ "${CROSS_BUILD}" ]; then
vsed -i setup.py -e "s@['\"]cc['\"]@'${CC}'@g" \
-e "/os.path.join/s@/usr@${XBPS_CROSS_BASE}/usr@g"
vsed -e "s@['\"]cc['\"]@'${CC}'@g" \
-i src/python/grpcio/commands.py
fi
# Use BoringSSL ASM when possible
local asm_key
case "${XBPS_TARGET_MACHINE}" in
x86_64*) asm_key=crypto_linux_x86_64;;
i686*) asm_key=crypto_linux_x86;;
aarch64*) asm_key=crypto_linux_aarch64;;
armv6l*|armv7l*) asm_key=crypto_linux_arm;;
ppc64le*) asm_key=crypto_linux_ppc64le;;
*) ;;
esac
vsed -i setup.py \
-e "s/asm_key = .*/asm_key = '${asm_key}'/" \
-e "s/if BUILD_WITH_BORING_SSL_ASM:/if False:/"
}

View file

@ -0,0 +1 @@
pattern="grpcio-\K[0-9.]+(?=.tar)"