Skip to content

Commit

Permalink
Replace distutils module
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeul committed Jul 9, 2024
1 parent c77f42e commit 8e562e8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8e562e8

Please sign in to comment.