summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2020-11-10 09:18:40 +0800
committerJoe MacDonald <joe@deserted.net>2020-11-12 14:01:07 -0500
commit5a58e87aa998c53527f92b32c3e6bc516a03d9a3 (patch)
tree0ef31d9471fc79fd4ae7a26e206f9c71b18c3e79
parentbe95d6f88c68df94db44a2129de5a7a3a0b9c7d9 (diff)
downloadmeta-selinux-5a58e87aa998c53527f92b32c3e6bc516a03d9a3.tar.gz
setools: fix build with Python 3.9
The Py_UNICODE_COPY, Py_UNICODE_FILL, PyUnicode_WSTR_LENGTH, PyUnicode_FromUnicode(), PyUnicode_AsUnicode(), _PyUnicode_AsUnicode, and PyUnicode_AsUnicodeAndSize() are marked as deprecated in Python 3.9. (See: https://docs.python.org/3/whatsnew/3.9.html). But the current python3-cython (0.29.21) hasn't adapt it yet. Append '-Wno-deprecated-declarations' in CFLAGS as a workaround to fix the build issue. Fixes: In file included from /build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/unicodeobject.h:1026, from /build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/Python.h:97, from setools/policyrep.c:49: /build/tmp-glibc/work/corei7-64-wrs-linux/setools/4.3.0-r0/recipe-sysroot/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ setools/policyrep.c:97302:3: error: 'PyUnicode_AsUnicode' is deprecated [-Werror=deprecated-declarations] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-security/setools/setools_4.3.0.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/recipes-security/setools/setools_4.3.0.bb b/recipes-security/setools/setools_4.3.0.bb
index 8fdeeb0..0f166c8 100644
--- a/recipes-security/setools/setools_4.3.0.bb
+++ b/recipes-security/setools/setools_4.3.0.bb
@@ -30,6 +30,8 @@ RDEPENDS_${PN} += "python3-networkx python3-decorator python3-setuptools \
30 30
31RDEPENDS_${PN}_class-native = "" 31RDEPENDS_${PN}_class-native = ""
32 32
33CFLAGS_append = " -Wno-deprecated-declarations"
34
33RPROVIDES_${PN} += "${PN}-console" 35RPROVIDES_${PN} += "${PN}-console"
34 36
35inherit setuptools3 37inherit setuptools3