Skip to content

Commit

Permalink
COMP: use sysconfig.get_path as PEP 632 deprecate distutils module
Browse files Browse the repository at this point in the history
  • Loading branch information
hubutui authored and dzenanz committed Aug 1, 2022
1 parent d12f14e commit 28325d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Wrapping/Generators/Python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ file(MAKE_DIRECTORY ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python)
###############################################################################
# Configure Python wrapping installation
if(Python3_EXECUTABLE AND NOT PY_SITE_PACKAGES_PATH)
set(python_check "try:\n import distutils.sysconfig\n print(distutils.sysconfig.get_python_lib(plat_specific=1, prefix=''))\nexcept:\n pass")
set(python_check "try:\n import sysconfig\n print(sysconfig.get_path('platlib'))\nexcept:\n pass")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py ${python_check})
execute_process(COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/detect_site_package_path.py"
OUTPUT_VARIABLE py_spp
Expand Down

0 comments on commit 28325d9

Please sign in to comment.