From 74b4d5f5d16ae34bcd541730bd49d66dcb1684de Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 31 Jul 2019 16:23:23 -0600 Subject: python: use Cython language "3str" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the Cython language level to "3str" which is described in the Cython 0.29 changelog: "A new language level name 3str was added that mostly corresponds to language level 3, but keeps unprefixed string literals as type ‘str’ in both Py2 and Py3, and the builtin ‘str’ type unchanged. This will become the default in the next Cython release and is meant to help user code a) transition more easily to this new default and b) migrate to Python 3 source code semantics without making support for Python 2.x difficult." Signed-off-by: Paul Moore (cherry picked from commit d390edad9a8540c2e2dd0b12732cc8dd3fe1cc69) Signed-off-by: Tom Hromatka Acked-by: Paul Moore --- configure.ac | 4 ++-- src/python/seccomp.pyx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 05d34a5..1dc8e5d 100644 --- a/configure.ac +++ b/configure.ac @@ -109,8 +109,8 @@ AC_ARG_ENABLE([python], [build the python bindings, requires cython])]) AS_IF([test "$enable_python" = yes], [ # cython version check - AS_IF([test "$CYTHON_VER_MAJ" -eq 0 -a "$CYTHON_VER_MIN" -lt 16], [ - AC_MSG_ERROR([python bindings require cython 0.16 or higher]) + AS_IF([test "$CYTHON_VER_MAJ" -eq 0 -a "$CYTHON_VER_MIN" -lt 29], [ + AC_MSG_ERROR([python bindings require cython 0.29 or higher]) ]) AM_PATH_PYTHON ]) diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx index 771b9c3..121a0d6 100644 --- a/src/python/seccomp.pyx +++ b/src/python/seccomp.pyx @@ -19,6 +19,8 @@ # along with this library; if not, see . # +# cython: language_level = 3str + """ Python bindings for the libseccomp library The libseccomp library provides and easy to use, platform independent, -- cgit v1.2.1