[Patches] [ python-Patches-444854 ] Distutils config _link doesn't clean up

noreply@sourceforge.net noreply@sourceforge.net
Thu, 26 Jul 2001 13:45:33 -0700


Patches item #444854, was opened at 2001-07-26 09:55
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=444854&group_id=5470

Category: distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tarn Weisner Burton (twburton)
Assigned to: Nobody/Anonymous (nobody)
Summary: Distutils config _link doesn't clean up

Initial Comment:
The distutils.config.config._link method doesn't 
return the right program name for win32 and hence 
doesn't clean up after itself properly.  There's a 
comment about this in the source...is there a reason 
this isn't done?

Anyways, the offending code is:

prog = os.path.splitext(os.path.basename(src))[0] 
self.temp_files.append(prog)

which should be changed to

prog = os.path.splitext(os.path.basename(src))[0] 
if sys.platform == 'win32': prog = prog + '.exe'
self.temp_files.append(prog)

The sys module needs to imported also.

thanks,
Tarn

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

>Comment By: Tarn Weisner Burton (twburton)
Date: 2001-07-26 13:45

Message:
Logged In: YES 
user_id=21784

Sorry, previous fix doesn't quite work.

The lines:

if sys.platform == 'win32': prog = prog + '.exe'
self.temp_files.append(prog)

need to be placed after the line:

self.compiler.link_executable(...

otherwise the executable gets the wrong name


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

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