From cf59d70d6ae237a46ef73e67d1e8b2d9292360a8 Mon Sep 17 00:00:00 2001 From: Derek Straka Date: Wed, 20 Dec 2023 23:01:09 +0000 Subject: python3-protobuf: update to version 4.25.1 Remove patch 0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch that was incorporated upstream and released in 4.25.1 Signed-off-by: Derek Straka Signed-off-by: Khem Raj --- ....c-Cast-uintptr_t-types-to-upb_MessageDef.patch | 57 ---------------------- .../python/python3-protobuf_4.24.4.bb | 39 --------------- .../python/python3-protobuf_4.25.1.bb | 38 +++++++++++++++ 3 files changed, 38 insertions(+), 96 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch delete mode 100644 meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb create mode 100644 meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb (limited to 'meta-python/recipes-devtools/python') diff --git a/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch b/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch deleted file mode 100644 index 89315e3a7d..0000000000 --- a/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 8ce4b50b210d3c0f8de40156d4ba7827bfe16b21 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 16 Aug 2023 17:36:19 -0700 -Subject: [PATCH] message.c: Cast uintptr_t types to upb_MessageDef - -This fixes build with clang - -python/message.c:1238:49: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1238 | upb_MessageDef_MiniTable(other->def), - | ^~~~~~~~~~ -/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here - 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); - | ^ -python/message.c:1609:69: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1609 | upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def), - | ^~~~~~~~~ -/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here - 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); - | ^ -python/message.c:1611:44: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1611 | PyObject* ret = PyUpb_Message_Get(clone, self->def, arena); - | ^~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/protocolbuffers/upb/pull/1492] -Signed-off-by: Khem Raj ---- - python/message.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/python/message.c b/python/message.c -index a01ce16..c418b84 100644 ---- a/python/message.c -+++ b/python/message.c -@@ -1235,7 +1235,7 @@ static PyObject* PyUpb_Message_CopyFrom(PyObject* _self, PyObject* arg) { - Py_DECREF(tmp); - - upb_Message_DeepCopy(self->ptr.msg, other->ptr.msg, -- upb_MessageDef_MiniTable(other->def), -+ upb_MessageDef_MiniTable((const upb_MessageDef*)other->def), - PyUpb_Arena_Get(self->arena)); - PyUpb_Message_SyncSubobjs(self); - -@@ -1606,9 +1606,9 @@ PyObject* DeepCopy(PyObject* _self, PyObject* arg) { - - PyObject* arena = PyUpb_Arena_New(); - upb_Message* clone = -- upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def), -+ upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable((const upb_MessageDef*)self->def), - PyUpb_Arena_Get(arena)); -- PyObject* ret = PyUpb_Message_Get(clone, self->def, arena); -+ PyObject* ret = PyUpb_Message_Get(clone, (const upb_MessageDef*)self->def, arena); - Py_DECREF(arena); - - return ret; --- -2.41.0 - diff --git a/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb b/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb deleted file mode 100644 index 4b530c3b1d..0000000000 --- a/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "Protocol Buffers" -HOMEPAGE = "https://developers.google.com/protocol-buffers/" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" - -inherit pypi setuptools3 -SRC_URI += "file://0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch" -SRC_URI[sha256sum] = "5a70731910cd9104762161719c3d883c960151eea077134458503723b60e3667" - -# http://errors.yoctoproject.org/Errors/Details/184715/ -# Can't find required file: ../src/google/protobuf/descriptor.proto -CLEANBROKEN = "1" - -UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" - -DEPENDS += "protobuf" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-pkgutil \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-unittest \ -" - -# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) -BBCLASSEXTEND = "native nativesdk" - -DISTUTILS_BUILD_ARGS += "--cpp_implementation" -DISTUTILS_INSTALL_ARGS += "--cpp_implementation" - -do_compile:prepend:class-native () { - export KOKORO_BUILD_NUMBER="1" -} diff --git a/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb b/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb new file mode 100644 index 0000000000..3c770e41d3 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Protocol Buffers" +HOMEPAGE = "https://developers.google.com/protocol-buffers/" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "57d65074b4f5baa4ab5da1605c02be90ac20c8b40fb137d6a8df9f416b0d0ce2" + +# http://errors.yoctoproject.org/Errors/Details/184715/ +# Can't find required file: ../src/google/protobuf/descriptor.proto +CLEANBROKEN = "1" + +UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" + +DEPENDS += "protobuf" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-pkgutil \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-unittest \ +" + +# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) +BBCLASSEXTEND = "native nativesdk" + +DISTUTILS_BUILD_ARGS += "--cpp_implementation" +DISTUTILS_INSTALL_ARGS += "--cpp_implementation" + +do_compile:prepend:class-native () { + export KOKORO_BUILD_NUMBER="1" +} -- cgit v1.2.3-54-g00ecf