Building extensions with mingw32 -- bdist_wininst fails.

Thomas Heller theller at python.net
Fri Aug 8 04:31:39 EDT 2003


[posted and mailed]

"Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net> writes:

> From: "Thomas Heller" <theller at python.net>
>
>> > I checked the archives regarding that error message and
>> > found a conversation wherein Jeremy Hylton claimed he
>> > might have added the code to detect this, and Paul Moore
>> > asked to have it removed/disabled at least for mingw32
>> > (which makes binaries 100% compatible with MSVC6).  In
>> > the case given then, the extension wouldn't build at
>> > all; now it builds but I can't make a Windows installer
>> > from it.
>>
>> Can you point me to this discussion, please? Then I'll
>> try to look after this.
>>
>> Thomas
>
> Thanks!  First, here's where I found the messages I refer
> to above:
>
> http://mail.python.org/pipermail/distutils-sig/2003-July/003339.html
>
> OK, here's the problem.  The distutils bdist_wininst
> script calls build (illustrated below) but does not
> accept --compiler=mingw32.  This is obviously wrong,
> but I'm unsure how to fix it (I'm still trying to wrap
> my fuzzy and tired mind around the entire distutils
> thing).


There's an easy workaround.
  python setup.py bdist_wininst --compiler=mingw32
does *not* work.
But this one does:

  python setup.py build --compiler=mingw32 bdist_wininst

Maybe this should be documented somewhere?

I've tried it with one of my simple extension modules at least,
and after hacking msvccompiler so that this one isn't found any longer.

Thomas




More information about the Python-list mailing list