]> granicus.if.org Git - python/commitdiff
Patch #827386: Support absolute source paths in msvccompiler.py.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 7 Aug 2005 20:51:04 +0000 (20:51 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 7 Aug 2005 20:51:04 +0000 (20:51 +0000)
Backported to 2.4.

Lib/distutils/msvccompiler.py
Misc/NEWS

index b94d35f15f4d30baf6d11a6b5becd20b3811dff5..85d515b20dbc38ea5d2a7467b02c4ed74dda21ae 100644 (file)
@@ -269,6 +269,8 @@ class MSVCCompiler (CCompiler) :
         obj_names = []
         for src_name in source_filenames:
             (base, ext) = os.path.splitext (src_name)
+            base = os.path.splitdrive(base)[1] # Chop off the drive
+            base = base[os.path.isabs(base):]  # If abs, chop off leading /
             if ext not in self.src_extensions:
                 # Better to raise an exception instead of silently continuing
                 # and later complain about sources and targets having
index 8a2d504b43f3f38a5684b2aba2475b5af61fc05f..ef879c4c6890cbf6706368fa079053a02f8bd778 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -178,6 +178,8 @@ Extension Modules
 Library
 -------
 
+- Patch #827386: Support absolute source paths in msvccompiler.py.
+
 - Patch #1105730: Apply the new implementation of commonprefix in posixpath
   to ntpath, macpath, os2emxpath and riscospath.