pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-protobuf



Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Nov 25 13:13:54 UTC 2022

Modified Files:
        pkgsrc/devel/py-protobuf: Makefile distinfo

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 pkgsrc/devel/py-protobuf/Makefile
cvs rdiff -u -r1.56 -r1.57 pkgsrc/devel/py-protobuf/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-protobuf/Makefile
diff -u pkgsrc/devel/py-protobuf/Makefile:1.60 pkgsrc/devel/py-protobuf/Makefile:1.61
--- pkgsrc/devel/py-protobuf/Makefile:1.60      Fri Oct 28 08:36:05 2022
+++ pkgsrc/devel/py-protobuf/Makefile   Fri Nov 25 13:13:54 2022
@@ -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 @@ MAKE_ENV+=           PROTOC=${PREFIX}/bin/protoc
 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"

Index: pkgsrc/devel/py-protobuf/distinfo
diff -u pkgsrc/devel/py-protobuf/distinfo:1.56 pkgsrc/devel/py-protobuf/distinfo:1.57
--- pkgsrc/devel/py-protobuf/distinfo:1.56      Fri Oct 28 08:36:05 2022
+++ pkgsrc/devel/py-protobuf/distinfo   Fri Nov 25 13:13:54 2022
@@ -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