cython3
authorKees Cook <kees@debian.org>
Thu, 12 Mar 2020 22:35:13 +0000 (22:35 +0000)
committerFelix Geyer <fgeyer@debian.org>
Thu, 12 Mar 2020 22:35:13 +0000 (22:35 +0000)
https://github.com/seccomp/libseccomp/pull/188

From 8d09eb9314ad00aa0584345ae66d4419b38da8e0 Mon Sep 17 00:00:00 2001
From: Paul Moore <paul@paul-moore.com>
Date: Wed, 13 Nov 2019 20:54:25 -0500
Subject: [PATCH] build: try to use explicitly marked Python 3.x tools first

Python 2.x is going EOL very soon, so let's require Python 3.x now
and attempt to use the explicitly marked Python 3.x tools first.

Signed-off-by: Paul Moore <paul@paul-moore.com>
Gbp-Pq: Name cython3.patch

configure.ac

index 3fc85ddef3b3e1cf9710b0ea43eb1bd1d4782332..f91ee3b1dbb0d1af7b87abf5adf1958379043b96 100644 (file)
@@ -91,11 +91,11 @@ AC_SUBST([VERSION_MICRO])
 dnl ####
 dnl cython checks
 dnl ####
-AC_CHECK_PROG(have_cython, cython, "yes", "no")
-AS_IF([test "$have_cython" = yes], [
-       AS_ECHO("checking cython version... $(cython -V 2>&1 | cut -d' ' -f 3)")
-       CYTHON_VER_MAJ=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
-       CYTHON_VER_MIN=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
+AC_CHECK_PROGS(cython, cython3 cython, "no")
+AS_IF([test "$cython" != no], [
+       AS_ECHO("checking cython version... $($cython -V 2>&1 | cut -d' ' -f 3)")
+       CYTHON_VER_MAJ=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
+       CYTHON_VER_MIN=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
 ],[
        CYTHON_VER_MAJ=0
        CYTHON_VER_MIN=0
@@ -112,7 +112,7 @@ AS_IF([test "$enable_python" = yes], [
        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
+       AM_PATH_PYTHON([3])
 ])
 AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes])
 AC_DEFINE_UNQUOTED([ENABLE_PYTHON],