Compile python extensions under windows/cygwin

Christian Heimes lists at cheimes.de
Sun May 24 19:13:53 EDT 2009


Joana wrote:
> I mantain Python on Windows, all installed packages are under c:
> \Python25\Lib\site-packages. Now I have to build C libraries used by
> python extensions and I am using cygwin, but I don't know how to
> install the module in Windows directory.

Are you sure you want to use Cygwin? Binaries build with and for Cygwin
are not compatible with ordinary Windows binaries. I assume that you
want to build C extensions with the open source MinGW32 compiler? That's
easy:

* Install MinGW32
* Add its bin directory to PATH
* Add a file distutils.cfg in C:\Python25\Lib\distutils with
  this content:

[build]
compiler=mingw32


* Have fun :)

Christian




More information about the Python-list mailing list