Building Python C extension modules for Windows

python, windows

Solution

You can use both MinGW and VC++ Express (free, no need to buy it).

See:

- http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/

- http://eli.thegreenplace.net/2008/06/27/creating-python-extension-modules-in-c/

Problem

I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows. Would I need to buy a copy of Visual Studio, or does Visual Studio Express work? Can I just use Cygwin or MinGW?

Original source