Skip to content

Commit 055b662

Browse files
committed
Make Python for regen check more verbose
1 parent f5818e6 commit 055b662

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

configure

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
31423142
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
31433143
rm -f pybuilddir.txt
31443144

3145-
for ac_prog in python$PACKAGE_VERSION python3 python
3145+
for ac_prog in python$PACKAGE_VERSION python3.10 python3.9 python3.8 python3.7 python3.6 python3 python
31463146
do
31473147
# Extract the first word of "$ac_prog", so it can be a program name with args.
31483148
set dummy $ac_prog; ac_word=$2
@@ -3187,6 +3187,16 @@ test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
31873187

31883188

31893189

3190+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python for regen version" >&5
3191+
$as_echo_n "checking Python for regen version... " >&6; }
3192+
if command -v $PYTHON_FOR_REGEN >/dev/null 2>&1; then
3193+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $($PYTHON_FOR_REGEN -V 2>/dev/null)" >&5
3194+
$as_echo "$($PYTHON_FOR_REGEN -V 2>/dev/null)" >&6; }
3195+
else
3196+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: missing" >&5
3197+
$as_echo "missing" >&6; }
3198+
fi
3199+
31903200
if test "$cross_compiling" = yes; then
31913201
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
31923202
$as_echo_n "checking for python interpreter for cross build... " >&6; }

configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,18 @@ AC_SUBST(host)
9696
# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
9797
rm -f pybuilddir.txt
9898

99-
AC_CHECK_PROGS(PYTHON_FOR_REGEN, python$PACKAGE_VERSION python3 python, python3)
99+
AC_CHECK_PROGS([PYTHON_FOR_REGEN],
100+
[python$PACKAGE_VERSION python3.10 python3.9 python3.8 python3.7 python3.6 python3 python],
101+
[python3])
100102
AC_SUBST(PYTHON_FOR_REGEN)
101103

104+
AC_MSG_CHECKING([Python for regen version])
105+
if command -v $PYTHON_FOR_REGEN >/dev/null 2>&1; then
106+
AC_MSG_RESULT([$($PYTHON_FOR_REGEN -V 2>/dev/null)])
107+
else
108+
AC_MSG_RESULT([missing])
109+
fi
110+
102111
if test "$cross_compiling" = yes; then
103112
AC_MSG_CHECKING([for python interpreter for cross build])
104113
if test -z "$PYTHON_FOR_BUILD"; then

0 commit comments

Comments
 (0)