From b20ef35645b5ac09095f5f35504608de2e42e15b Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 4 Nov 2015 01:03:57 +0000 Subject: Python 3 - Don't add the _d suffix to the symlink on Windows. In Python 2, a debug extension module required an _d suffix, so for example the extension module `_lldb` would be backed by the file `_lldb_d.pyd` if built in debug mode, and `_lldb.pyd` if built in release mode. In Python 2, although undocumented, this seems to no longer be the case, and even for a debug extension module, the interpreter will only look for the `_lldb.pyd` name. llvm-svn: 252026 --- lldb/scripts/Python/finishSwigPythonLLDB.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/scripts/Python/finishSwigPythonLLDB.py') diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py index 45cb8b98887..d6eb10d6c99 100644 --- a/lldb/scripts/Python/finishSwigPythonLLDB.py +++ b/lldb/scripts/Python/finishSwigPythonLLDB.py @@ -350,8 +350,10 @@ def make_symlink_liblldb( vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName if eOSType == utilsOsType.EnumOsType.Windows: # When importing an extension module using a debug version of python, you # write, for example, "import foo", but the interpreter searches for - # "foo_d.pyd" - if is_debug_interpreter(): + # "foo_d.pyd". This only applies for Python 2, however. Python 3 does + # not use the _d suffix for extension modules. + import six + if is_debug_interpreter() and six.PY2: strTarget += "_d"; strTarget += ".pyd"; else: -- cgit v1.2.3