pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/py-protobuf py-protobuf: add support for python ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/cc576e462293
branches: trunk
changeset: 388716:cc576e462293
user: wiz <wiz%pkgsrc.org@localhost>
date: Fri Nov 25 13:13:54 2022 +0000
description:
py-protobuf: add support for python 3.11
Use the binary wheel for now; upstream includes old sources in the
source distribution that do not support python 3.11 but the binary
wheels are built from sources that do.
https://github.com/protocolbuffers/protobuf/issues/11031#issuecomment-1321390551
Comments:
- Should we generally switch to the binary wheel for now?
We might want to use the new sources for other python versions as well.
- This increases pkglint output for this package a lot, but since is
hopefully a temporary measure, I didn't put more effort into
deduplicating the PLIST
diffstat:
devel/py-protobuf/Makefile | 23 +++++++++++++++++++++--
devel/py-protobuf/distinfo | 5 ++++-
2 files changed, 25 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 5561b546c130 -r cc576e462293 devel/py-protobuf/Makefile
--- a/devel/py-protobuf/Makefile Fri Nov 25 12:34:21 2022 +0000
+++ b/devel/py-protobuf/Makefile Fri Nov 25 13:13:54 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2022/10/28 08:36:05 adam Exp $
+# $NetBSD: Makefile,v 1.61 2022/11/25 13:13:54 wiz Exp $
DISTNAME= protobuf-4.21.9
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
@@ -18,6 +18,25 @@
PYSETUPBUILDARGS= --cpp_implementation
PYSETUPINSTALLARGS= --cpp_implementation
-.include "../../devel/protobuf/buildlink3.mk"
+.include "../../lang/python/pyversion.mk"
+
+.if ${PYPKGPREFIX} == py311
+# as of 4.21.9, the sources do contain outdated code that only supports Python < 3.11
+# https://github.com/protocolbuffers/protobuf/issues/11031#issuecomment-1321390551
+# use the binary wheel for now, since it does support Python 3.11
+NO_BUILD= yes
+MASTER_SITES= https://files.pythonhosted.org/packages/0b/c3/bfe27bff58e895261e5054f38e9f12fcccd67d70ccad66c22ba987b17fc9/
+PLIST_SRC= PLIST.py311
+.include "../../lang/python/wheel.mk"
+
+post-install:
+. for f in lib/python3.11/site-packages/google/protobuf/internal/_parameterized.py
+ cd ${DESTDIR}${PREFIX} && \
+ ${SED} -e s",/usr/bin/env python,${PYTHONBIN}," ${f} > ${f}.patched && ${MV} ${f}.patched ${f}
+. endfor
+.else
.include "../../lang/python/egg.mk"
+.endif
+
+.include "../../devel/protobuf/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 5561b546c130 -r cc576e462293 devel/py-protobuf/distinfo
--- a/devel/py-protobuf/distinfo Fri Nov 25 12:34:21 2022 +0000
+++ b/devel/py-protobuf/distinfo Fri Nov 25 13:13:54 2022 +0000
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.56 2022/10/28 08:36:05 adam Exp $
+$NetBSD: distinfo,v 1.57 2022/11/25 13:13:54 wiz Exp $
+BLAKE2s (protobuf-4.21.9-py3-none-any.whl) = 6135497223901c60c861f6a86bd5cda71623a567a82690bdcce07cd95766a708
+SHA512 (protobuf-4.21.9-py3-none-any.whl) = f464fd87bfbdbddfa1f4f0033a5685abc8a71574a1b654ca1a5a910ec8ca2cbae4e09da4ad8d49b8729f5d98c20fbaa8ba49a84d433d27a746d53bef236af3d2
+Size (protobuf-4.21.9-py3-none-any.whl) = 291642 bytes
BLAKE2s (protobuf-4.21.9.tar.gz) = b41cd82762363d1e82c2fb367fabe3fe712f7d3c0156fb26b348c37f52aa4b08
SHA512 (protobuf-4.21.9.tar.gz) = 0350869d8abf890997625039c8f83b33d5d3d6a2898d02cb639b1ca78276af8ba0e24866d6cbbb36802ff84a305591f27892743f7d6e142608b5175a2c90f77b
Size (protobuf-4.21.9.tar.gz) = 220396 bytes
Home |
Main Index |
Thread Index |
Old Index