[Python-checkins] python/dist/src/Lib/distutils ccompiler.py,1.55,1.56
akuchling@users.sourceforge.net
akuchling@users.sourceforge.net
Wed, 26 Feb 2003 10:52:14 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1:/tmp/cvs-serv28481
Modified Files:
ccompiler.py
Log Message:
[Bug #668662] Patch from Pearu Pearson: if a C source file is
specified with an absolute path, the object file is also
written to an absolute path. The patch drops the drive and
leading '/' from the source path, so a path like /path/to/foo.c
results in an object file like build/temp.i686linux/path/to/foo.o.
Index: ccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** ccompiler.py 29 Dec 2002 17:00:57 -0000 1.55
--- ccompiler.py 26 Feb 2003 18:52:07 -0000 1.56
***************
*** 933,936 ****
--- 933,938 ----
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:
raise UnknownFileError, \