git: 066bf46c62fc - main - devel/py-grpcio: fix build with newer python.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Dec 2021 06:55:37 UTC
The branch main has been updated by vanilla:
URL: https://cgit.FreeBSD.org/ports/commit/?id=066bf46c62fce1e04b09d38e309423775538e212
commit 066bf46c62fce1e04b09d38e309423775538e212
Author: Vanilla I. Shu <vanilla@FreeBSD.org>
AuthorDate: 2021-12-12 06:53:38 +0000
Commit: Vanilla I. Shu <vanilla@FreeBSD.org>
CommitDate: 2021-12-12 06:53:38 +0000
devel/py-grpcio: fix build with newer python.
PR: 260316
Reported by: amdmi3@
---
devel/py-grpcio/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/devel/py-grpcio/Makefile b/devel/py-grpcio/Makefile
index d520cc2faba8..09ef72b7124b 100644
--- a/devel/py-grpcio/Makefile
+++ b/devel/py-grpcio/Makefile
@@ -16,12 +16,15 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}protobuf>=3:devel/py-protobuf@${PY_FLAVOR} \
LIB_DEPENDS= libcares.so:dns/c-ares
USES= compiler:c++11-lib localbase:ldflags python:3.6+ ssl
-USE_PYTHON= autoplist distutils
+USE_PYTHON= autoplist cython distutils
MAKE_ENV+= GRPC_PYTHON_BUILD_SYSTEM_CARES=true \
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true \
GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true
LDFLAGS+= -lcares
+post-patch:
+ @${RM} ${WRKSRC}/src/python/grpcio/grpc/_cython/cygrpc.cpp
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/grpc/_cython/cygrpc*.so
${REINPLACE_CMD} -e 's|${PYTHONPREFIX_SITELIBDIR}/\(.*\)/grpcio/grpc/_cython/cygrpc${PYTHON_EXT_SUFFIX}.so|${PYTHONPREFIX_SITELIBDIR}/grpc/_cython/cygrpc${PYTHON_EXT_SUFFIX}.so|g' ${_PYTHONPKGLIST}