graphviz/graphviz-7.0.5-fix-python-3.12.patch

22 lines
1.2 KiB
Diff

diff -up graphviz-7.0.5/configure.ac.fixpy312 graphviz-7.0.5/configure.ac
--- graphviz-7.0.5/configure.ac.fixpy312 2022-12-29 14:11:15.564390331 -0500
+++ graphviz-7.0.5/configure.ac 2022-12-29 14:16:03.923297996 -0500
@@ -1129,7 +1129,7 @@ else
PYTHON_PREFIX=`$PYTHON -c "import sys; print(sys.prefix)"`
PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
PYTHON_LIBS="-undefined dynamic_lookup"
- PYTHON_INSTALL_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
+ PYTHON_INSTALL_DIR="`$PYTHON -c 'import sysconfig; print(sysconfig.get_path("platlib"))'`"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_CHECK_HEADER(Python.h,,[
@@ -1189,7 +1189,7 @@ else
use_python3="No (python-$PYTHON3_VERSION.pc not found)"
fi
fi
- PYTHON3_INSTALL_DIR="`$PYTHON3 -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(1,0))'`"
+ PYTHON3_INSTALL_DIR="`$PYTHON3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))'`"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PYTHON3_INCLUDES"
AC_CHECK_HEADER(Python.h,,[