[Python-Dev] Python should be easily compilable on Windows with MinGW

Nathaniel Smith njs at pobox.com
Fri Feb 26 14:12:28 EST 2016


On Feb 26, 2016 9:56 AM, "Alexander Walters" <tritium-list at sdamon.com>
wrote:
>
> No.
>
> Visual Studio is a solid compiler suit, mingw is a jenky mess, especially
when you try and move to 64bit (where I don't think there is one true
version of mingw).

I see why you say this, but I think you're seriously underestimating mingw.

There's the split between the legacy mingw and mingw-w64 fork, but that's a
non-issue: legacy mingw is basically dead, everyone uses mingw-w64 for both
32- and 64-bits, no big deal.

If you want a precompiled mingw-w64, then there's a ton of different
distributions to choose from, but that's true of lots of F/OSS projects,
including python itself. There are a few different official build
configurations (e.g. "seh" vs "sjlj"), but they all have to do with the C++
abi so don't matter for python itself.

The one real issue is that classically mingw-w64 has not been compatible
with msvc -- mostly due to using different C runtimes, but with a few other
corner case issues too. This, however, is fixable. The PSF- and
NumFOCUS-sponsored mingwpy project is near to having builds of mingw-w64
that are abi compatible with all cpython releases from 2.6-3.4:
  http://mingwpy.github.io/

The bigger challenge is getting a version of mingw-w64 that is compatible
with the latest MSVC used for cpython 3.5+, since they rearranged the
runtimes (for the better, but...). Unfortunately this is also the case
that's relevant for OP's use case of working on cpython itself. There's no
technical obstacle to doing this, and it's a major priority for both the
numerical python community and mingw-w64 upstream, but it's not currently
clear who will do the work and if/how it will be funded.

In any case though I agree that now is not a good time to start trying to
support two incompatible windows ABIs in python upstream, just we're
converging on a common abi across the different compilers.

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160226/74a7e2ed/attachment.html>


More information about the Python-Dev mailing list