mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
autoconf prefers Python 3 over 2
The configure script now looks for Python 3.6 or newer, then falls back to Python 2. All Makefile default to Python 3 if Python 3 is available. See: pagure.io/freeipa/issue/7131 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
fd9ede5296
commit
fa94ef0412
33
configure.ac
33
configure.ac
@ -100,27 +100,28 @@ PKG_CHECK_MODULES([CRYPTO], [libcrypto])
|
|||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl - Check for Python
|
dnl - Check for Python
|
||||||
dnl ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
AC_MSG_NOTICE([Checking for Python])
|
|
||||||
have_python=no
|
|
||||||
AM_PATH_PYTHON(2.7)
|
|
||||||
|
|
||||||
if test "x$PYTHON" = "x" ; then
|
|
||||||
AC_MSG_ERROR([Python not found])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
|
||||||
dnl - Check for Python 2/3 for devcheck
|
dnl - Check for Python 2/3 for devcheck
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([Checking for Python 3])
|
||||||
|
AC_PATH_PROG(PYTHON3, python3)
|
||||||
|
AC_SUBST([PYTHON3])
|
||||||
|
AM_CONDITIONAL([WITH_PYTHON3], [test "x${PYTHON3}" != "x"])
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([Checking for Python 2])
|
||||||
AC_PATH_PROG(PYTHON2, python2)
|
AC_PATH_PROG(PYTHON2, python2)
|
||||||
AC_SUBST([PYTHON2])
|
AC_SUBST([PYTHON2])
|
||||||
AM_CONDITIONAL([WITH_PYTHON2], [test "x${PYTHON2}" != "x"])
|
AM_CONDITIONAL([WITH_PYTHON2], [test "x${PYTHON2}" != "x"])
|
||||||
|
|
||||||
AC_PATH_PROG(PYTHON3, python3)
|
if test \( "x${PYTHON3}" = "x" -o "x${PYTHON}" != "x" \); then
|
||||||
AC_SUBST([PYTHON3])
|
dnl Python 3 is not available *or* user has set PYTHON variable.
|
||||||
AM_CONDITIONAL([WITH_PYTHON3], [test "x${PYTHON3}" != "x"])
|
dnl Accept Python >= 2.7 as default Python. We also accept any Python 3
|
||||||
|
dnl version from PYTHON environment variable.
|
||||||
|
AM_PATH_PYTHON(2.7)
|
||||||
|
elif test "x${PYTHON3}" != "x"; then
|
||||||
|
dnl Found Python 3, but no user override. Use Python >= 3.6 as default.
|
||||||
|
AM_PATH_PYTHON(3.6)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl - Check for cmocka unit test framework http://cmocka.cryptomilk.org/
|
dnl - Check for cmocka unit test framework http://cmocka.cryptomilk.org/
|
||||||
@ -590,7 +591,9 @@ echo "
|
|||||||
source code location: ${srcdir}
|
source code location: ${srcdir}
|
||||||
compiler: ${CC}
|
compiler: ${CC}
|
||||||
cflags: ${CFLAGS}
|
cflags: ${CFLAGS}
|
||||||
Python: ${PYTHON}
|
Default Python: ${PYTHON} (${PYTHON_VERSION})
|
||||||
|
Python 2: ${PYTHON2}
|
||||||
|
Python 3: ${PYTHON3}
|
||||||
pylint: ${PYLINT}
|
pylint: ${PYLINT}
|
||||||
jslint: ${JSLINT}
|
jslint: ${JSLINT}
|
||||||
LDAP libs: ${LDAP_LIBS}
|
LDAP libs: ${LDAP_LIBS}
|
||||||
|
Loading…
Reference in New Issue
Block a user