]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test: another check for PEP-3147 induced by Python 3.12.1.
authorBogdan <bogdro_rep@gmx.us>
Mon, 29 Jan 2024 02:12:50 +0000 (18:12 -0800)
committerKarl Berry <karl@freefriends.org>
Mon, 29 Jan 2024 02:12:50 +0000 (18:12 -0800)
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

index fbbb79005b37d259a5b1818cc8989740a947414e..d61fd6662209a5047e702761205ae90169a85faa 100644 (file)
@@ -635,6 +635,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=