diff options
Diffstat (limited to 'meta-python/recipes-devtools/python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python-protobuf.inc | 4 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python-protobuf_3.8.0.bb (renamed from meta-python/recipes-devtools/python/python-protobuf_3.6.1.bb) | 0 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-protobuf/0001-Add-Python-3.7-compatibility-4862.patch | 98 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-protobuf_3.8.0.bb (renamed from meta-python/recipes-devtools/python/python3-protobuf_3.6.1.bb) | 1 |
4 files changed, 2 insertions, 101 deletions
diff --git a/meta-python/recipes-devtools/python/python-protobuf.inc b/meta-python/recipes-devtools/python/python-protobuf.inc index 54eacc0b7e..2929700a0b 100644 --- a/meta-python/recipes-devtools/python/python-protobuf.inc +++ b/meta-python/recipes-devtools/python/python-protobuf.inc | |||
| @@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec | |||
| 7 | 7 | ||
| 8 | inherit pypi | 8 | inherit pypi |
| 9 | 9 | ||
| 10 | SRC_URI[md5sum] = "e2daef80e70249aa1f05363670c6b3f8" | 10 | SRC_URI[md5sum] = "b7095f3eb736459716d606677b5a29ee" |
| 11 | SRC_URI[sha256sum] = "1489b376b0f364bcc6f89519718c057eb191d7ad6f1b395ffd93d1aa45587811" | 11 | SRC_URI[sha256sum] = "8c61cc8a76e9d381c665aecc5105fa0f1878cf7db8b5cd17202603bcb386d0fc" |
| 12 | 12 | ||
| 13 | # http://errors.yoctoproject.org/Errors/Details/184715/ | 13 | # http://errors.yoctoproject.org/Errors/Details/184715/ |
| 14 | # Can't find required file: ../src/google/protobuf/descriptor.proto | 14 | # Can't find required file: ../src/google/protobuf/descriptor.proto |
diff --git a/meta-python/recipes-devtools/python/python-protobuf_3.6.1.bb b/meta-python/recipes-devtools/python/python-protobuf_3.8.0.bb index f04fc489f0..f04fc489f0 100644 --- a/meta-python/recipes-devtools/python/python-protobuf_3.6.1.bb +++ b/meta-python/recipes-devtools/python/python-protobuf_3.8.0.bb | |||
diff --git a/meta-python/recipes-devtools/python/python3-protobuf/0001-Add-Python-3.7-compatibility-4862.patch b/meta-python/recipes-devtools/python/python3-protobuf/0001-Add-Python-3.7-compatibility-4862.patch deleted file mode 100644 index da5e73b152..0000000000 --- a/meta-python/recipes-devtools/python/python3-protobuf/0001-Add-Python-3.7-compatibility-4862.patch +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | From 539bc017a62f91bdf7c547b58948cb5a2f59d918 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ben Webb <ben@salilab.org> | ||
| 3 | Date: Thu, 12 Jul 2018 10:58:10 -0700 | ||
| 4 | Subject: [PATCH] Add Python 3.7 compatibility (#4862) | ||
| 5 | |||
| 6 | Compilation of Python wrappers fails with Python 3.7 because | ||
| 7 | the Python folks changed their C API such that | ||
| 8 | PyUnicode_AsUTF8AndSize() now returns a const char* rather | ||
| 9 | than a char*. Add a patch to work around. Relates #4086. | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://github.com/protocolbuffers/protobuf.git] | ||
| 12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | google/protobuf/pyext/descriptor.cc | 2 +- | ||
| 16 | google/protobuf/pyext/descriptor_containers.cc | 2 +- | ||
| 17 | google/protobuf/pyext/descriptor_pool.cc | 2 +- | ||
| 18 | google/protobuf/pyext/extension_dict.cc | 2 +- | ||
| 19 | google/protobuf/pyext/message.cc | 4 ++-- | ||
| 20 | 5 files changed, 6 insertions(+), 6 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/google/protobuf/pyext/descriptor.cc b/google/protobuf/pyext/descriptor.cc | ||
| 23 | index 8af0cb1..19a1c38 100644 | ||
| 24 | --- a/google/protobuf/pyext/descriptor.cc | ||
| 25 | +++ b/google/protobuf/pyext/descriptor.cc | ||
| 26 | @@ -56,7 +56,7 @@ | ||
| 27 | #endif | ||
| 28 | #define PyString_AsStringAndSize(ob, charpp, sizep) \ | ||
| 29 | (PyUnicode_Check(ob)? \ | ||
| 30 | - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ | ||
| 31 | + ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ | ||
| 32 | PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ||
| 33 | #endif | ||
| 34 | |||
| 35 | diff --git a/google/protobuf/pyext/descriptor_containers.cc b/google/protobuf/pyext/descriptor_containers.cc | ||
| 36 | index bc007f7..0153664 100644 | ||
| 37 | --- a/google/protobuf/pyext/descriptor_containers.cc | ||
| 38 | +++ b/google/protobuf/pyext/descriptor_containers.cc | ||
| 39 | @@ -66,7 +66,7 @@ | ||
| 40 | #endif | ||
| 41 | #define PyString_AsStringAndSize(ob, charpp, sizep) \ | ||
| 42 | (PyUnicode_Check(ob)? \ | ||
| 43 | - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ | ||
| 44 | + ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ | ||
| 45 | PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ||
| 46 | #endif | ||
| 47 | |||
| 48 | diff --git a/google/protobuf/pyext/descriptor_pool.cc b/google/protobuf/pyext/descriptor_pool.cc | ||
| 49 | index 95882ae..962accc 100644 | ||
| 50 | --- a/google/protobuf/pyext/descriptor_pool.cc | ||
| 51 | +++ b/google/protobuf/pyext/descriptor_pool.cc | ||
| 52 | @@ -48,7 +48,7 @@ | ||
| 53 | #endif | ||
| 54 | #define PyString_AsStringAndSize(ob, charpp, sizep) \ | ||
| 55 | (PyUnicode_Check(ob)? \ | ||
| 56 | - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ | ||
| 57 | + ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ | ||
| 58 | PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | diff --git a/google/protobuf/pyext/extension_dict.cc b/google/protobuf/pyext/extension_dict.cc | ||
| 62 | index 018b5c2..174c547 100644 | ||
| 63 | --- a/google/protobuf/pyext/extension_dict.cc | ||
| 64 | +++ b/google/protobuf/pyext/extension_dict.cc | ||
| 65 | @@ -53,7 +53,7 @@ | ||
| 66 | #endif | ||
| 67 | #define PyString_AsStringAndSize(ob, charpp, sizep) \ | ||
| 68 | (PyUnicode_Check(ob)? \ | ||
| 69 | - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ | ||
| 70 | + ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ | ||
| 71 | PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ||
| 72 | #endif | ||
| 73 | |||
| 74 | diff --git a/google/protobuf/pyext/message.cc b/google/protobuf/pyext/message.cc | ||
| 75 | index 5893533..31094b7 100644 | ||
| 76 | --- a/google/protobuf/pyext/message.cc | ||
| 77 | +++ b/google/protobuf/pyext/message.cc | ||
| 78 | @@ -79,7 +79,7 @@ | ||
| 79 | (PyUnicode_Check(ob)? PyUnicode_AsUTF8(ob): PyBytes_AsString(ob)) | ||
| 80 | #define PyString_AsStringAndSize(ob, charpp, sizep) \ | ||
| 81 | (PyUnicode_Check(ob)? \ | ||
| 82 | - ((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \ | ||
| 83 | + ((*(charpp) = const_cast<char*>(PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL? -1: 0): \ | ||
| 84 | PyBytes_AsStringAndSize(ob, (charpp), (sizep))) | ||
| 85 | #endif | ||
| 86 | #endif | ||
| 87 | @@ -1529,7 +1529,7 @@ PyObject* HasField(CMessage* self, PyObject* arg) { | ||
| 88 | return NULL; | ||
| 89 | } | ||
| 90 | #else | ||
| 91 | - field_name = PyUnicode_AsUTF8AndSize(arg, &size); | ||
| 92 | + field_name = const_cast<char*>(PyUnicode_AsUTF8AndSize(arg, &size)); | ||
| 93 | if (!field_name) { | ||
| 94 | return NULL; | ||
| 95 | } | ||
| 96 | -- | ||
| 97 | 2.7.4 | ||
| 98 | |||
diff --git a/meta-python/recipes-devtools/python/python3-protobuf_3.6.1.bb b/meta-python/recipes-devtools/python/python3-protobuf_3.8.0.bb index 9b0668a02b..30ea34e908 100644 --- a/meta-python/recipes-devtools/python/python3-protobuf_3.6.1.bb +++ b/meta-python/recipes-devtools/python/python3-protobuf_3.8.0.bb | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | inherit setuptools3 | 1 | inherit setuptools3 |
| 2 | require python-protobuf.inc | 2 | require python-protobuf.inc |
| 3 | 3 | ||
| 4 | SRC_URI += "file://0001-Add-Python-3.7-compatibility-4862.patch" | ||
| 5 | DEPENDS += "protobuf" | 4 | DEPENDS += "protobuf" |
| 6 | DISTUTILS_BUILD_ARGS += "--cpp_implementation" | 5 | DISTUTILS_BUILD_ARGS += "--cpp_implementation" |
| 7 | DISTUTILS_INSTALL_ARGS += "--cpp_implementation" | 6 | DISTUTILS_INSTALL_ARGS += "--cpp_implementation" |
