From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Tue, 10 Sep 2024 10:20:51 +0200
Subject: Replace distutils.sysconfig with the stdlib sysconfig

sysconfig has been available since Python 3.2
https://docs.python.org/3/library/sysconfig.html#module-sysconfig
---
 atac-driver/config.py | 4 ++--
 configure.sh          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/atac-driver/config.py b/atac-driver/config.py
index 2f9a059..567d6f5 100644
--- a/atac-driver/config.py
+++ b/atac-driver/config.py
@@ -3,9 +3,9 @@
 import sys
 import os
 import getopt
-from distutils import sysconfig
+import sysconfig
 
-print(sysconfig.get_python_inc())
+print(sysconfig.get_config_var("CONFINCLUDEPY"))
 
 #        flags = ['-I' + ,
 #                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
diff --git a/configure.sh b/configure.sh
index 26ff7cc..f980cbd 100755
--- a/configure.sh
+++ b/configure.sh
@@ -87,7 +87,7 @@ if [ ! -x $PYTHON ] ; then
   WITHOUT_ATAC="atac-driver/ seatac/"
 else
   echo "Python executable found in '$PYTHON'"
-  CFLAGS_PYTHON=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
+  CFLAGS_PYTHON=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_var('CONFINCLUDEPY'))"`
   
   if [ -z "$CFLAGS_PYTHON" -o ! -d "$CFLAGS_PYTHON" ] ; then
     echo "WARNING:  Python development environment not found."
