diff options
author | Paul Moore <paul@paul-moore.com> | 2019-07-31 16:23:23 -0600 |
---|---|---|
committer | Tom Hromatka <tom.hromatka@oracle.com> | 2019-08-02 12:04:41 -0600 |
commit | 74b4d5f5d16ae34bcd541730bd49d66dcb1684de (patch) | |
tree | 43ad18aa29620a48516c65d009f695d42868da07 | |
parent | 14ef1515d0f39d71fedca5910e0a7836c24f31c4 (diff) | |
download | libseccomp-74b4d5f5d16ae34bcd541730bd49d66dcb1684de.tar.gz |
python: use Cython language "3str"
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 <paul@paul-moore.com>
(cherry picked from commit d390edad9a8540c2e2dd0b12732cc8dd3fe1cc69)
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: Paul Moore <paul@paul-moore.com>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | 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 <http://www.gnu.org/licenses>. # +# cython: language_level = 3str + """ Python bindings for the libseccomp library The libseccomp library provides and easy to use, platform independent, |