diff options
author | Thomas Heller <theller@ctypes.org> | 2002-04-25 17:29:45 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2002-04-25 17:29:45 (GMT) |
commit | 69d31b749d79c9831201ab5dd72411062bcb2b1c (patch) | |
tree | 042483f0ca6bf03655aabc17d5d59e8550d83632 /Lib | |
parent | 378498dad6fd218bf4563fedc274561c49b26606 (diff) | |
download | cpython-69d31b749d79c9831201ab5dd72411062bcb2b1c.zip cpython-69d31b749d79c9831201ab5dd72411062bcb2b1c.tar.gz cpython-69d31b749d79c9831201ab5dd72411062bcb2b1c.tar.bz2 |
Pass the full pathname to MSVC when compiling a debug version. This
allows the debugger to find the source without asking the user to
browse for it.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/msvccompiler.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 79a4901..73cd442 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -309,6 +309,12 @@ class MSVCCompiler (CCompiler) : else: self.mkpath (os.path.dirname (obj)) + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + if ext in self._c_extensions: input_opt = "/Tc" + src elif ext in self._cpp_extensions: |