patch 9.1.0669: if_python: stable python ABI not used by default

Problem:  stable python ABI not used by default
Solution: Enable stable python ABI v3.8 when building with python3/dyn
          by default, update the default Python3 version to 3.8 for
          MS-Windows (Ken Takata)

closes: #15470
related: #15457

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ken Takata
2024-08-11 18:41:41 +02:00
committed by Christian Brabandt
parent 3383ed7e24
commit 1c032e36a6
5 changed files with 44 additions and 14 deletions

View File

@ -1539,12 +1539,21 @@ if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic";
AC_MSG_RESULT(yep)
dnl -- get the stable ABI version if passed in
python3_stable_abi_default=3.8
AC_MSG_CHECKING(--with-python3-stable-abi argument)
AC_SUBST(vi_cv_var_python3_stable_abi)
AC_ARG_WITH(python3-stable-abi, [ --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)],
vi_cv_var_python3_stable_abi="$withval"; AC_MSG_RESULT($vi_cv_var_python3_stable_abi),
AC_MSG_RESULT(no))
if test "X$vi_cv_var_python3_stable_abi" != "X"; then
AC_ARG_WITH(python3-stable-abi, [ --with-python3-stable-abi=VERSION stable ABI version to target (default: 3.8)],
[
if test "X$withval" = "Xyes"; then
vi_cv_var_python3_stable_abi=$python3_stable_abi_default
else
vi_cv_var_python3_stable_abi="$withval"
fi
AC_MSG_RESULT($vi_cv_var_python3_stable_abi)],
[
vi_cv_var_python3_stable_abi=$python3_stable_abi_default
AC_MSG_RESULT(no. defaults to $python3_stable_abi_default.)])
if test "X$vi_cv_var_python3_stable_abi" != "Xno"; then
AC_CACHE_VAL(vi_cv_var_python3_stable_abi_hex,
[
vi_cv_var_python3_stable_abi_hex=`