test: another check for PEP-3147 induced by Python 3.12.1

Backport f1112a88d2361eb2ba5cedf49995ac75879059d9 which brings
compatibility with python 3.12.1 for pep3147_tweak.

Resolves: RHEL-66594
This commit is contained in:
Frédéric Bérat 2024-11-27 15:33:06 +01:00
parent a55b0269f0
commit 9fc80687cf
2 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,32 @@
From f5b7751be8fb0fb9238f1d6acd5d6b592ad942cc Mon Sep 17 00:00:00 2001
From: Bogdan <bogdro_rep@gmx.us>
Date: Sun, 28 Jan 2024 18:12:50 -0800
Subject: [PATCH] test: another check for PEP-3147 induced by Python 3.12.1.
Fix for more of https://bugs.gnu.org/68119.
* t/ax/am-test-lib.sh (python_has_pep3147) <am_pep3147_tag>:
check sys.implementation.cache_tag as well as the (old)
imp.get_tag. For Python 3.12.1.
---
t/ax/am-test-lib.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 547b82bd4..72f409784 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -634,6 +634,10 @@ python_has_pep3147 ()
am_pep3147_tag=$($PYTHON -c 'import imp; print(imp.get_tag())') \
|| am_pep3147_tag=none
fi
+ if test "$am_pep3147_tag" = "none"; then
+ am_pep3147_tag=$($PYTHON -c 'import sys; print(sys.implementation.cache_tag)') \
+ || am_pep3147_tag=none
+ fi
test $am_pep3147_tag != none
}
am_pep3147_tag=
--
2.47.0

View File

@ -23,7 +23,7 @@ Summary: A GNU tool for automatically creating Makefiles
Name: automake
# Any bump here requires libtool rebuild, rhbz#1813010
Version: %{api_version}.5
Release: 19%{?dist}
Release: 20%{?dist}
# To help future rebase, the following licenses were seen in the following files/folders:
# usr/bin/* - GPL-2.0-or-later
@ -78,6 +78,9 @@ Patch6: 0001-tests-depcomp-ensure-make_ok-fails-when-run_make-fai.patch
# From upstream: ab347652df9ff8f65ba1be6aaa357cf3c2b16dca
Patch7: 0001-python-support-noinst_PYTHON-preceding-foo_PYTHON.patch
# From upstream: f1112a88d2361eb2ba5cedf49995ac75879059d9
Patch8: 0001-test-another-check-for-PEP-3147-induced-by-Python-3..patch
URL: http://www.gnu.org/software/automake/
Requires: autoconf >= 2.65
@ -180,8 +183,11 @@ make -k %{?_smp_mflags} check %{?TESTS_FLAGS: TESTS="%{TESTS_FLAGS}"} \
%changelog
* Wed Nov 27 2024 Frederic Berat <fberat@redhat.com> - 1.16.5-20
- test: another check for PEP-3147 induced by Python 3.12.1 (RHEL-66594)
* Tue Nov 26 2024 Frederic Berat <fberat@redhat.com> - 1.16.5-19
- Filter ncompress out for rhel (RHEL-66594)
- Filter ncompress out for rhel (RHEL-59969)
- Fix pep3147_tweak regression (RHEL-59974)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.16.5-18