From 7b4f8dc048c088674358fedc680ee6e0633457f8 Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Sat, 27 Aug 2016 20:34:33 +0200 Subject: [PATCH] Fix module file name when working with debug builds of Python Fixes #365. `sysconfig.get_config_var('SO')` already returns the correct PYTHON_MODULE_EXTENSION, even for debug builds, so there is no need to add anything else manually. --- tools/FindPythonLibsNew.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index 76e18b39..a2472a99 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/tools/FindPythonLibsNew.cmake @@ -134,11 +134,6 @@ string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX ${PYTHON_PREFIX}) string(REGEX REPLACE "\\\\" "/" PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR}) string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES}) -# TODO: All the nuances of CPython debug builds have not been dealt with/tested. -if(PYTHON_IS_DEBUG) - set(PYTHON_MODULE_EXTENSION "_d${PYTHON_MODULE_EXTENSION}") -endif() - if(CMAKE_HOST_WIN32) set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/Python${PYTHON_LIBRARY_SUFFIX}.lib")