From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/files/, dev-python/protobuf-python/
Date: Tue, 2 Oct 2018 20:08:09 +0000 (UTC) [thread overview]
Message-ID: <1538510846.75e0f119f85b8115b69e74a24b27b50df527f9cd.floppym@gentoo> (raw)
commit: 75e0f119f85b8115b69e74a24b27b50df527f9cd
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Oct 2 19:50:26 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Oct 2 20:07:26 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e0f119
dev-python/protobuf-python: Support Python 3.7.
Closes: https://bugs.gentoo.org/664508
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/protobuf-python-3.6.1-python-3.7.patch | 67 ++++++++++++++++++++++
.../protobuf-python/protobuf-python-3.6.1.ebuild | 3 +-
2 files changed, 69 insertions(+), 1 deletion(-)
diff --git a/dev-python/protobuf-python/files/protobuf-python-3.6.1-python-3.7.patch b/dev-python/protobuf-python/files/protobuf-python-3.6.1-python-3.7.patch
new file mode 100644
index 00000000000..bd4ce9d7fca
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-3.6.1-python-3.7.patch
@@ -0,0 +1,67 @@
+https://github.com/protocolbuffers/protobuf/pull/4862
+https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7
+
+--- /python/google/protobuf/pyext/descriptor.cc
++++ /python/google/protobuf/pyext/descriptor.cc
+@@ -56,7 +56,7 @@
+ #endif
+ #define PyString_AsStringAndSize(ob, charpp, sizep) \
+ (PyUnicode_Check(ob)? \
+- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+ PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+
+--- /python/google/protobuf/pyext/descriptor_containers.cc
++++ /python/google/protobuf/pyext/descriptor_containers.cc
+@@ -66,7 +66,7 @@
+ #endif
+ #define PyString_AsStringAndSize(ob, charpp, sizep) \
+ (PyUnicode_Check(ob)? \
+- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+ PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+
+--- /python/google/protobuf/pyext/descriptor_pool.cc
++++ /python/google/protobuf/pyext/descriptor_pool.cc
+@@ -48,7 +48,7 @@
+ #endif
+ #define PyString_AsStringAndSize(ob, charpp, sizep) \
+ (PyUnicode_Check(ob)? \
+- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+ PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+
+--- /python/google/protobuf/pyext/extension_dict.cc
++++ /python/google/protobuf/pyext/extension_dict.cc
+@@ -53,7 +53,7 @@
+ #endif
+ #define PyString_AsStringAndSize(ob, charpp, sizep) \
+ (PyUnicode_Check(ob)? \
+- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+ PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+
+--- /python/google/protobuf/pyext/message.cc
++++ /python/google/protobuf/pyext/message.cc
+@@ -79,7 +79,7 @@
+ (PyUnicode_Check(ob)? PyUnicode_AsUTF8(ob): PyBytes_AsString(ob))
+ #define PyString_AsStringAndSize(ob, charpp, sizep) \
+ (PyUnicode_Check(ob)? \
+- ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
++ ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \
+ PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
+ #endif
+ #endif
+@@ -1529,7 +1529,7 @@
+ return NULL;
+ }
+ #else
+- field_name = PyUnicode_AsUTF8AndSize(arg, &size);
++ field_name = const_cast<char*>(PyUnicode_AsUTF8AndSize(arg, &size));
+ if (!field_name) {
+ return NULL;
+ }
diff --git a/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
index d2f29ce98df..3d8397734fc 100644
--- a/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-3.6.1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
-PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
+PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6,3_7})
inherit distutils-r1
@@ -27,6 +27,7 @@ S="${WORKDIR}/protobuf-${PV}/python"
python_prepare_all() {
eapply -p2 "${FILESDIR}/${PN}-3.5.2-google.protobuf.pyext._message.MessageMeta.patch"
+ eapply -p2 "${FILESDIR}/${PN}-3.6.1-python-3.7.patch"
distutils-r1_python_prepare_all
}
next reply other threads:[~2018-10-02 20:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 20:08 Mike Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-03 19:35 [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/files/, dev-python/protobuf-python/ Jason Zaman
2022-04-22 7:09 Michał Górny
2022-02-14 8:32 Michał Górny
2020-09-24 14:26 Mike Gilbert
2019-12-06 20:25 Mike Gilbert
2019-04-19 16:39 Mike Gilbert
2018-04-26 15:14 Mike Gilbert
2017-05-09 17:18 Michał Górny
2016-06-23 15:57 Patrice Clement
2016-04-21 9:52 Ian Delaney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538510846.75e0f119f85b8115b69e74a24b27b50df527f9cd.floppym@gentoo \
--to=floppym@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox