From 19252e8ec938bf07897c1519f367d0467a39242c Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 16 Feb 2022 22:47:35 -0800 Subject: 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 Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de --- src/tools/msvc/Mkvcbuild.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index bab81bd459a..105f5c72a2d 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -490,6 +490,10 @@ sub mkvcbuild if (!(defined($pyprefix) && defined($pyver))); my $pymajorver = substr($pyver, 0, 1); + + die "Python version $pyver is too old (version 3 or later is required)" + if int($pymajorver) < 3; + my $plpython = $solution->AddProject('plpython' . $pymajorver, 'dll', 'PLs', 'src/pl/plpython'); $plpython->AddIncludeDir($pyprefix . '/include'); -- cgit v1.2.3