[Patches] [ python-Patches-827386 ] absolute paths cause problems for MSVC

SourceForge.net noreply at sourceforge.net
Sun May 1 11:20:01 CEST 2005


Patches item #827386, was opened at 2003-10-21 18:11
Message generated for change (Comment added) made by mdehoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=827386&group_id=5470

Category: Distutils and setup.py
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: eric jones (eaj)
Assigned to: Nobody/Anonymous (nobody)
Summary: absolute paths cause problems for MSVC

Initial Comment:
When source files are given in the form:

c:\foo\bar.c

the object file is written to:

c:\foo\bar.o

instead of the build\temp.win32-2.3 directory.  This is 
because the object_filenames method doesn't chop off 
the drive name from source file name base before trying 
to concatenate the build directory with the base.  This 
results in the build directory being ignored.  The 
ccompiler.py object_filenames does it right, so I just 
copied its behavior.  

----------------------------------------------------------------------

Comment By: Michiel de Hoon (mdehoon)
Date: 2005-05-01 18:20

Message:
Logged In: YES 
user_id=488897

I have tested your patch and found that it works as intended.
I am a bit surprised about the approach taken in ccompiler.py:
1) Using absolute paths is not portable, so I'm not sure why
somebody would want to do that.
2) With this patch, If the source file is in c:\foo\bar.c,
then the object file is written to
build\temp.win32-2.3\Release\foo\bar.o. However, if the
source file is written with a relative patch ("bar.c"), the
object file is written to build\temp.win32-2.3\Release\bar.o
(so without "foo"). Hence, even though the source file bar.c
is in the exact same location in these two cases, the object
file ends up in a different location depending on whether
the path is specified as absolute or relative. Is that
really what we want?

But I agree that the behavior of msvccompiler.py and
ccompiler.py should be consistent.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=827386&group_id=5470


More information about the Patches mailing list