[Patches] [ python-Patches-718049 ] Setting exe_extension for cygwin

SourceForge.net noreply@sourceforge.net
Wed, 09 Apr 2003 00:45:33 -0700


Patches item #718049, was opened at 2003-04-09 16:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=718049&group_id=5470

Category: Distutils and setup.py
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michiel de Hoon (mdehoon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Setting exe_extension for cygwin

Initial Comment:
On cygwin, the setup.py script uses unixccompiler.py
for compiling and linking C extensions. The
unixccompiler.py script assumes that executables do not
get special extensions, which makes sense for Unix.
However, on Cygwin, executables get an .exe extension.

This causes a problem during the configuration step
(python setup.py config), in which some temporary
executables may be generated. As unixccompiler.py does
not know about the .exe extension, distutils fails to
clean up after itself: it does not remove
_configtest.exe but tries to remove _configtest instead.

The attached patch to unixccompiler.py sets the correct
exe_extension for cygwin by checking if sys.platform is
'cygwin'. With this patch, distutils cleans up after
itself correctly.

Michiel de Hoon
University of Tokyo, Human Genome Center.

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

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