From 188daa776d6d53fc3fdd7cfad209ce6f4f06cbcb Mon Sep 17 00:00:00 2001 From: William Dawson Date: Thu, 29 Feb 2024 20:02:10 +0900 Subject: [PATCH] Backport #224 --- Source/Swig/ConfigPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Swig/ConfigPython.cmake b/Source/Swig/ConfigPython.cmake index d41ae4ca..f243c8d5 100644 --- a/Source/Swig/ConfigPython.cmake +++ b/Source/Swig/ConfigPython.cmake @@ -3,6 +3,6 @@ macro(get_py_include) execute_process( COMMAND ${PYTHON_EXECUTABLE} -c - "from distutils.sysconfig import get_python_inc; print(get_python_inc())" + "import sysconfig; print(sysconfig.get_path('include'))" OUTPUT_VARIABLE PYTHON_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) endmacro()