From 9ddc5503a58672beacd8b4e531b3f7490f9b9084 Mon Sep 17 00:00:00 2001
From: Alina Lenk <alina.v.lenk@gmail.com>
Date: Fri, 18 Feb 2022 22:30:03 +0100
Subject: [PATCH] Make Python 3.4 the minimum officially supported version

See osdn #43745

Signed-off-by: Alina Lenk <alina.v.lenk@gmail.com>
---
 autogen.sh                 | 2 +-
 common/generate_packets.py | 5 ++---
 doc/README.packaging       | 1 +
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 8dfd16bd25..5749157dca 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -249,7 +249,7 @@ ACLOCAL=$REALPKGNAME
 real_package_name "libtoolize" "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 ||
 real_package_name "glibtoolize" "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 "" "0" || DIE=1
 LIBTOOLIZE=$REALPKGNAME
-real_package_name "python3" "https://www.python.org/" || DIE=1
+real_package_name "python3" "https://www.python.org/" 3 4 || DIE=1
 
 if [ "$FC_USE_NLS" = "yes" ]; then
   DIE2=0
diff --git a/common/generate_packets.py b/common/generate_packets.py
index 5c2ba43a0c..04d068342d 100755
--- a/common/generate_packets.py
+++ b/common/generate_packets.py
@@ -30,9 +30,8 @@ fold_bool_into_header=1
 
 ################# END OF PARAMETERS ####################
 
-# This program runs under any python version since 1.5.
-# Please leave it so. In particular use the string
-# module and not the function of the string type.
+# This script runs under Python 3.4 and up. Please leave it so.
+# It might also run under older versions, but no such guarantees are made.
 
 import re, string, os, sys
 
diff --git a/doc/README.packaging b/doc/README.packaging
index 6e950ef83f..27e887b7ae 100644
--- a/doc/README.packaging
+++ b/doc/README.packaging
@@ -35,6 +35,7 @@ Updating from 3.0 to 3.1
   Ruledit is 5.11.
 * New configure option --with-qtver=qt6 builds Qt6 versions of Qt programs
 * Support for zstd compressed savegames added, requires libzstd and headers
+* Minimum Python requirement for code generation scripts is 3.4 now.
 
 ----------------------------------------------------------------------
 Compatibility of modified versions
-- 
2.17.1