aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gr-usrptest/cmake/Modules/GrPython.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gr-usrptest/cmake/Modules/GrPython.cmake b/tools/gr-usrptest/cmake/Modules/GrPython.cmake
index 9ac72c2d8..fdd1aff61 100644
--- a/tools/gr-usrptest/cmake/Modules/GrPython.cmake
+++ b/tools/gr-usrptest/cmake/Modules/GrPython.cmake
@@ -105,8 +105,10 @@ endmacro(GR_PYTHON_CHECK_MODULE)
########################################################################
if(NOT DEFINED GR_PYTHON_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
-from distutils import sysconfig
-print sysconfig.get_python_lib(plat_specific=True, prefix='')
+import sysconfig
+platlib = sysconfig.get_path(name='platlib')
+base = sysconfig.get_config_var('base')
+print(platlib.replace(base, '').lstrip('/\\\\'))
" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()