[Distutils] solved Re: [Twisted-Python] Re: Twisted - Python 2.3 -
Windows - mingw
Cory Dodt
corydodt at yahoo.com
Thu Jul 31 13:09:31 EDT 2003
Phillip J. Eby wrote:
>
> It looks like the error occurs when an MSVCCompiler instance is
> created; I
> haven't yet figured out *why* such an instance is being created. I don't
> have 2.3 installed on Win32, so as an experiment, I added a 'raise'
> statement to 2.2's MSVCCompiler. If I specified compilation with msvc, I
> get the error I raised. If I specify mingw32, I don't. So, evidently
> 2.2's distutils don't create an MSVCCompiler instance when specifying
> mingw32. I can't fathom why 2.3 would do so.
Well, I figured out why. This was a bug in Twisted's setup.py, which
has a function _check_header that is supposed to invoke the compiler on
a tiny test module to make sure the module being built will build
successfully.
The new compiler is constructed with new_compiler(), but no arguments
were passed to it; it was this invocation that fails with the error
message I was getting. This bug was introduced some time ago; I'm not
sure why I didn't see it before now.
Using self.compiler instead worked (there's no need to call
new_compiler() when it's already been done for you).
C
More information about the Distutils-SIG
mailing list