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) }