Skip to content

Commit

Permalink
Replace deprecated distutils.sysconfig with sysconfig.
Browse files Browse the repository at this point in the history
distutils is not present in Python 3.12.2.
  • Loading branch information
jralls committed Feb 23, 2024
1 parent b9eb550 commit b217553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ if (WITH_PYTHON)

# Determine where to install the python libraries.
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}', plat_specific=True))"
COMMAND ${Python3_EXECUTABLE} -c "from sysconfig import get_path; print(get_path('platlib', 'posix_user', {'userbase': '${CMAKE_INSTALL_PREFIX}'}))"
RESULT_VARIABLE PYTHON_SYSCONFIG_RESULT
OUTPUT_VARIABLE PYTHON_SYSCONFIG_OUTPUT
ERROR_VARIABLE PYTHON_SYSCONFIG_ERROR
Expand Down

0 comments on commit b217553

Please sign in to comment.