diff options
author | Andres Freund <andres@anarazel.de> | 2022-02-16 22:47:35 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-02-16 22:47:35 -0800 |
commit | 19252e8ec938bf07897c1519f367d0467a39242c (patch) | |
tree | 758f4c8bec53a4bb37717fa7a549bf1c94fb8ee1 /src | |
parent | 8f388f6f554b113f25a53fe3237238d2c58ed1eb (diff) | |
download | postgresql-19252e8ec938bf07897c1519f367d0467a39242c.tar.gz postgresql-19252e8ec938bf07897c1519f367d0467a39242c.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 4 |
1 files changed, 4 insertions, 0 deletions
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'); |