From 8e562e89fcaebbc462f84769d8d8cae1d3b124fd Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 8 Jul 2024 22:15:08 -0400 Subject: [PATCH] Replace distutils module --- src/python/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 38874fe..dd38782 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -119,15 +119,10 @@ add_subdirectory(lib) # Find the python install dir IF(NOT DEFINED PYTHON_MODULE_INSTALL_DIR OR PYTHON_MODULE_INSTALL_DIR MATCHES "^$") - + execute_process( COMMAND "${PYTHON_EXECUTABLE}" -c - "from __future__ import print_function; from distutils import sysconfig as sc; print(sc.get_python_lib(prefix='', plat_specific=True))" - OUTPUT_VARIABLE PYTHON_SITE - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process( - COMMAND "${PYTHON_EXECUTABLE}" -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; print(get_python_lib())" + "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('platlib'))" OUTPUT_VARIABLE PYTHON_SITE OUTPUT_STRIP_TRAILING_WHITESPACE)