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()