Author's Bio: Anton Mamaenko

Wednesday, October 19, 2011

How to build Python modules with MinGW

Often a Python module includes C/C++ libraries that have to be built using a C/C++ compiler. That might lead to problems on Windows, when resulting .DLL libraries conflict if built with a "wrong" compiler http://boodebr.org/main/python/build-windows-extensions

I prefer using MinGW compiler for all libraries. To make it default building instrument there is an instruction (from boodebr.org)

To use the Cygwin/MinGW compiler when building Python module, create a file c:\frank\py25\lib\distutils\distutils.cfg:
[build]
compiler = mingw32

Now just execute setup.py file on the module, and it will do the rest

No comments:

Post a Comment

Search This Blog