mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
plpython: Reject Python 2 during build configuration.
Python 2.7 went EOL 2020-01-01 and the support for Python 2 requires a fair bit of infrastructure. Therefore we are removing Python 2 support in plpython. This patch just rejects Python 2 during configure / mkvcbuild.pl. Future commits will remove the code and infrastructure for Python 2 support and adjust more of the documentation. This way we can see the buildfarm state after the removal sooner and we can be sure that failures are due to desupporting Python 2, rather than caused by infrastructure cleanup. Reviewed-By: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de
This commit is contained in:
6
configure
vendored
6
configure
vendored
@ -10280,7 +10280,7 @@ fi
|
||||
|
||||
if test "$with_python" = yes; then
|
||||
if test -z "$PYTHON"; then
|
||||
for ac_prog in python python3 python2
|
||||
for ac_prog in python3 python
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
@ -10346,8 +10346,8 @@ python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
|
||||
python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
|
||||
python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
|
||||
# Reject unsupported Python versions as soon as practical.
|
||||
if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 7; then
|
||||
as_fn_error $? "Python version $python_version is too old (version 2.7 or later is required)" "$LINENO" 5
|
||||
if test "$python_majorversion" -lt 3; then
|
||||
as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
|
||||
|
Reference in New Issue
Block a user