]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
python: prioritize python 3.x over 2.x
authorMike Frysinger <vapier@gentoo.org>
Wed, 26 Jan 2022 11:36:32 +0000 (06:36 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 2 Dec 2023 11:23:31 +0000 (06:23 -0500)
Since Python 2.x went EOL years ago, stop searching for it before
any of the Python 3 versions.

* m4/python.m4: Move python2 after all python3 versions.
* NEWS: Mention update in version search.

NEWS
m4/python.m4

diff --git a/NEWS b/NEWS
index 86a9c5d212f1a4409f43268f14a08e8064545898..f246760405b0bc0cbcdb4bd4ee44773e5de39a95 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,12 @@ New in 1.17:
   - Pass any options given to AM_PROG_LEX on to AC_PROG_LEX.
     (bug#65600 and bug#65730)
 
+* Miscellaneous changes
+
+  - AM_PATH_PYTHON will, after checking `python`, prefer any Python 3
+    version over any Python 2 version.  If a specific version of Python 2 is
+    still needed, the $PYTHON variable can be set beforehand.
+
 * Obsolescence:
 
   - py-compile no longer supports Python 0.x or 1.x versions.  Python 2.0,
index 56c8961afa7ffecced2a69c8cdc49f7a64cced39..62166317dbbcb1f6b118fa66045063ecd6e47c76 100644 (file)
@@ -37,10 +37,11 @@ AC_DEFUN([AM_PATH_PYTHON],
   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
   dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 dnl
+[python python3 dnl
  python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 dnl
  python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
  python3.2 python3.1 python3.0 dnl
+ python2 dnl
  python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
  python2.0])