diff mbox series

[for-4.19,2/6] build: Fix the version of python checked for by ./configure

Message ID 20240705152037.1920276-3-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series CI: Fixes, part 2 | expand

Commit Message

Andrew Cooper July 5, 2024, 3:20 p.m. UTC
We previously upped the minimum python version to 2.6, but neglected to
reflect this in ./configure

Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Juergen Gross <jgross@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 tools/configure    | 8 ++++----
 tools/configure.ac | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Jan Beulich July 8, 2024, 6:39 a.m. UTC | #1
On 05.07.2024 17:20, Andrew Cooper wrote:
> We previously upped the minimum python version to 2.6, but neglected to
> reflect this in ./configure
> 
> Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile")

Judging from the description of that earlier patch and from what you're
actually changing, s/2.6/2.7/ above?

Jan

> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Anthony PERARD <anthony.perard@vates.tech>
> CC: Juergen Gross <jgross@suse.com>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Julien Grall <julien@xen.org>
> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> ---
>  tools/configure    | 8 ++++----
>  tools/configure.ac | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/configure b/tools/configure
> index 6c1084b7b28a..d160ca296202 100755
> --- a/tools/configure
> +++ b/tools/configure
> @@ -8298,15 +8298,15 @@ if test x"${PYTHONPATH}" = x"no"
>  then
>      as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5
>  fi
> -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.6 " >&5
> -printf %s "checking for python version >= 2.6 ... " >&6; }
> -`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 6)"))'`
> +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.7 " >&5
> +printf %s "checking for python version >= 2.7 ... " >&6; }
> +`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 7)"))'`
>  if test "$?" != "0"
>  then
>      python_version=`$PYTHON -V 2>&1`
>      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
>  printf "%s\n" "no" >&6; }
> -    as_fn_error $? "$python_version is too old, minimum required version is 2.6" "$LINENO" 5
> +    as_fn_error $? "$python_version is too old, minimum required version is 2.7" "$LINENO" 5
>  else
>      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
>  printf "%s\n" "yes" >&6; }
> diff --git a/tools/configure.ac b/tools/configure.ac
> index ac0fdc4314c4..be58f06be450 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -385,7 +385,7 @@ PYTHONPATH=$PYTHON
>  PYTHON=`basename $PYTHONPATH`
>  
>  AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON])
> -AX_CHECK_PYTHON_VERSION([2], [6])
> +AX_CHECK_PYTHON_VERSION([2], [7])
>  
>  AS_IF([test "$cross_compiling" != yes], [
>      AX_CHECK_PYTHON_DEVEL()
Roger Pau Monné July 8, 2024, 9:13 a.m. UTC | #2
On Fri, Jul 05, 2024 at 04:20:33PM +0100, Andrew Cooper wrote:
> We previously upped the minimum python version to 2.6, but neglected to
> reflect this in ./configure
> 
> Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

With the version in the commit log changed to 2.7 as noticed by Jan:

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
Andrew Cooper July 8, 2024, 9:39 a.m. UTC | #3
On 08/07/2024 7:39 am, Jan Beulich wrote:
> On 05.07.2024 17:20, Andrew Cooper wrote:
>> We previously upped the minimum python version to 2.6, but neglected to
>> reflect this in ./configure
>>
>> Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile")
> Judging from the description of that earlier patch and from what you're
> actually changing, s/2.6/2.7/ above?

Oops yes.  Fixed.

Thanks.

~Andrew
diff mbox series

Patch

diff --git a/tools/configure b/tools/configure
index 6c1084b7b28a..d160ca296202 100755
--- a/tools/configure
+++ b/tools/configure
@@ -8298,15 +8298,15 @@  if test x"${PYTHONPATH}" = x"no"
 then
     as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.6 " >&5
-printf %s "checking for python version >= 2.6 ... " >&6; }
-`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 6)"))'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.7 " >&5
+printf %s "checking for python version >= 2.7 ... " >&6; }
+`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 7)"))'`
 if test "$?" != "0"
 then
     python_version=`$PYTHON -V 2>&1`
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
 printf "%s\n" "no" >&6; }
-    as_fn_error $? "$python_version is too old, minimum required version is 2.6" "$LINENO" 5
+    as_fn_error $? "$python_version is too old, minimum required version is 2.7" "$LINENO" 5
 else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
diff --git a/tools/configure.ac b/tools/configure.ac
index ac0fdc4314c4..be58f06be450 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -385,7 +385,7 @@  PYTHONPATH=$PYTHON
 PYTHON=`basename $PYTHONPATH`
 
 AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON])
-AX_CHECK_PYTHON_VERSION([2], [6])
+AX_CHECK_PYTHON_VERSION([2], [7])
 
 AS_IF([test "$cross_compiling" != yes], [
     AX_CHECK_PYTHON_DEVEL()