Author Martin.Fiers
Recipients Martin.Fiers, RubyTuesdayDONO, Seppo.Yli-Olli, alexis, cmcqueen1975, danmbox, doko, geertj, jonforums, jwilk, loewis, merwok, pje, rpetrov, rubenvb, santoso.wijaya, schmir, tarek
Date 2013-02-26.08:49:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361868547.29.0.656384100866.issue12641@psf.upfronthosting.co.za>
In-reply-to
Content
This also affects our software. I agree with Dan (danmbox): I don't understand; so many people depend on it and yet an out-of-the-box solution doesn't work.

I don't want to break the distutils package of our users because we use mingw. Within one Python script, I managed to fix it using this before the setup call:

if isWindows():
	"""
	Fix bug in cygwinccompiler: removed -mno-cygwin. This is fixed in cygwinccompiler_new.
	We hacked the distutils.ccompiler : def new_compiler : It uses sys.modules to fetch the compiler
	By modifying the sys.modules, we can choose our own compiler version.
	(this is a bug that's out there for quite some time)
	"""
	import cygwinccompiler_new
	import distutils.cygwinccompiler
	import sys
	sys.modules["distutils.cygwinccompiler"] = cygwinccompiler_new

..if I then later run setup(...), it will use my new cygwinccompiler_new, that has the '-mno-cygwin' line removed.

However, when you want to install new packages using pip from the command-line, I cannot find a suitable fix (except if I would replace the distutils.cygwinccompiler before pip'ing, then put it back). For afaik, distutils cannot be virtualenv'ed, right? So we cannot even fix the issue in a virtual environment.

If it is not possible to find out what version of gcc implemented it first; can't you simply use a pragmatic solution and run
"gcc -mno-cygwin": if it gives an error, then remove the option. That would need the least testing and would fix the issue.
History
Date User Action Args
2013-02-26 08:49:07Martin.Fierssetrecipients: + Martin.Fiers, loewis, doko, pje, geertj, schmir, tarek, jwilk, merwok, rpetrov, cmcqueen1975, rubenvb, santoso.wijaya, alexis, Seppo.Yli-Olli, jonforums, RubyTuesdayDONO, danmbox
2013-02-26 08:49:07Martin.Fierssetmessageid: <1361868547.29.0.656384100866.issue12641@psf.upfronthosting.co.za>
2013-02-26 08:49:07Martin.Fierslinkissue12641 messages
2013-02-26 08:49:06Martin.Fierscreate