From f0fc04fbea3ec68d1cab321e016046e0b204def1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 25 Mar 2022 23:02:06 +0800 Subject: cmake/modules: drop a cmake variable less redirections Signed-off-by: Kefu Chai --- cmake/modules/Distutils.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmake/modules/Distutils.cmake') diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake index 2c0df43dea6..862f80820e2 100644 --- a/cmake/modules/Distutils.cmake +++ b/cmake/modules/Distutils.cmake @@ -63,9 +63,8 @@ function(distutils_add_cython_module target name src) set(PY_CXX ${compiler_launcher} ${CMAKE_CXX_COMPILER} ${cxx_compiler_arg1}) set(PY_LDSHARED ${link_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} "-shared") - set(suffix_var "EXT_SUFFIX") execute_process(COMMAND "${Python3_EXECUTABLE}" -c - "from distutils import sysconfig; print(sysconfig.get_config_var('${suffix_var}'))" + "from distutils import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" RESULT_VARIABLE result OUTPUT_VARIABLE ext_suffix ERROR_VARIABLE error -- cgit v1.2.3