File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11set (PYTHON_BIN python CACHE STRING "Python executable name" )
22
33execute_process (
4- COMMAND ${PYTHON_BIN} -c "from distutils. sysconfig import get_python_inc ; print(get_python_inc() )"
4+ COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths ; print(get_paths()['include'] )"
55 OUTPUT_VARIABLE PYTHON_SYS_PATH
66 )
77string (STRIP ${PYTHON_SYS_PATH} PYTHON_SYS_PATH)
@@ -16,7 +16,7 @@ set(PYTHON_INSTALL_HEADER_PATH ${PYTHON_INCLUDE_PATH}/symengine
1616 CACHE BOOL "Python install headers path" )
1717
1818execute_process (
19- COMMAND ${PYTHON_BIN} -c "from distutils. sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
19+ COMMAND ${PYTHON_BIN} -c "from sysconfig import get_config_var; print(get_config_var('LIBDIR'))"
2020 OUTPUT_VARIABLE PYTHON_LIB_PATH
2121 )
2222string (STRIP ${PYTHON_LIB_PATH} PYTHON_LIB_PATH)
@@ -50,7 +50,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
5050endif ()
5151
5252execute_process (
53- COMMAND ${PYTHON_BIN} -c "from distutils. sysconfig import get_python_lib ; print(get_python_lib() )"
53+ COMMAND ${PYTHON_BIN} -c "from sysconfig import get_paths ; print(get_paths()['purelib'] )"
5454 OUTPUT_VARIABLE PYTHON_INSTALL_PATH_tmp
5555 )
5656string (STRIP ${PYTHON_INSTALL_PATH_tmp} PYTHON_INSTALL_PATH_tmp)
Original file line number Diff line number Diff line change 1- from distutils . sysconfig import get_config_var
1+ from sysconfig import get_config_var
22extsuffix = get_config_var ('EXT_SUFFIX' )
33if extsuffix is None :
44 print ("" )
You can’t perform that action at this time.
0 commit comments