39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
# Template file for 'python3-grpcio'
|
|
pkgname=python3-grpcio
|
|
version=1.37.1
|
|
revision=1
|
|
archs="x86_64* i686* aarch64* armv[67]* ppc64le*"
|
|
wrksrc="${pkgname#*-}-${version}"
|
|
build_style=python3-module
|
|
hostmakedepends="python3-setuptools python3-six"
|
|
makedepends="python3-devel zlib-devel c-ares-devel re2-devel openssl-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=df8305806311d3fe913d4f7eb3ef28e2072159ea12f95baab5d447f1380a71e3
|
|
|
|
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
|
|
export GRPC_PYTHON_BUILD_SYSTEM_RE2=1
|
|
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=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
|
|
}
|