From 9a5682c3a38b987fe3ff3116cf3e5aa26e9a56b7 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 25 Apr 2018 19:57:54 +0200 Subject: [PATCH] dev-python/protobuf-python: Fix google.protobuf.pyext._message.MessageMeta. Closes: https://bugs.gentoo.org/651780 --- ....protobuf.pyext._message.MessageMeta.patch | 26 +++++++++++++++++++ ...ebuild => protobuf-python-3.5.2-r1.ebuild} | 5 ++++ 2 files changed, 31 insertions(+) create mode 100644 dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch rename dev-python/protobuf-python/{protobuf-python-3.5.2.ebuild => protobuf-python-3.5.2-r1.ebuild} (89%) diff --git a/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch new file mode 100644 index 0000000000000..d1e1d745ab7c2 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-3.5.2-google.protobuf.pyext._message.MessageMeta.patch @@ -0,0 +1,26 @@ +https://github.com/google/protobuf/pull/4365 + +--- /python/google/protobuf/pyext/message.cc ++++ /python/google/protobuf/pyext/message.cc +@@ -402,12 +402,6 @@ + return result.release(); + } + +-static PyGetSetDef Getters[] = { +- {"_extensions_by_name", (getter)GetExtensionsByName, NULL}, +- {"_extensions_by_number", (getter)GetExtensionsByNumber, NULL}, +- {NULL} +-}; +- + } // namespace message_meta + + PyTypeObject CMessageClass_Type = { +@@ -440,7 +434,7 @@ + 0, // tp_iternext + 0, // tp_methods + 0, // tp_members +- message_meta::Getters, // tp_getset ++ 0, // tp_getset + 0, // tp_base + 0, // tp_dict + 0, // tp_descr_get diff --git a/dev-python/protobuf-python/protobuf-python-3.5.2.ebuild b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild similarity index 89% rename from dev-python/protobuf-python/protobuf-python-3.5.2.ebuild rename to dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild index aaf563b424f3a..db40a5b37f8b0 100644 --- a/dev-python/protobuf-python/protobuf-python-3.5.2.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.5.2-r1.ebuild @@ -25,6 +25,11 @@ RDEPEND="${DEPEND} S="${WORKDIR}/protobuf-${PV}/python" +python_prepare_all() { + eapply -p2 "${FILESDIR}/${P}-google.protobuf.pyext._message.MessageMeta.patch" + distutils-r1_python_prepare_all +} + python_configure_all() { mydistutilsargs=(--cpp_implementation) }