Upgrade detection of Python include path for Python 3.12

Fixes #577.

* m4/pypath.m4: Python 3.12 removed distutils, so use sysconfig
instead.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2024-05-02 21:35:21 +02:00
parent be102e09d4
commit dbe31c72c8
2 changed files with 5 additions and 2 deletions

3
NEWS
View file

@ -317,6 +317,9 @@ New in spot 2.11.6.dev (not yet released)
by "a[->]". The latter should only replace "(!a)[*];a".
(Issue #559.)
- The configure script failed to detect the include path for Python 3.12.
(Issue #577.)
New in spot 2.11.6 (2023-08-01)
Bug fixes:

View file

@ -6,8 +6,8 @@ AC_DEFUN([adl_CHECK_PYTHON],
esac
AC_CACHE_CHECK([for $am_display_PYTHON includes directory],
[adl_cv_python_inc],
[adl_cv_python_inc=`$PYTHON -c "import sys; from distutils import sysconfig;]
[sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null`])
[adl_cv_python_inc=`$PYTHON -c "import sys, sysconfig;]
[sys.stdout.write(sysconfig.get_path('include'))" 2>/dev/null`])
AC_CACHE_CHECK([for $am_display_PYTHON extension suffix],
[adl_cv_python_ext],
[adl_cv_python_ext=`$PYTHON -c "import importlib.machinery as i; print(i.EXTENSION_SUFFIXES[[0]])"`])