Extending Python on Windows

Gerhard Häring gh_pythonlist at gmx.de
Tue Apr 2 00:08:48 EST 2002


* Gregory Propf <gpropf at cfl.rr.com> [2002-04-01 20:39 -0500]:
> [...] the GUI will be done with wxWindows in python.  I will need to
> build python extensions for this.

> I have tried to build this extension using the version of gcc and ld
> that comes with cygwin.

You don't really want to use Cygwin as target on Windows, do you? It's
perfectly possible to use Mingw's or Cygwin's gcc (or even the free
Borland compiler) to compile Python extensions for *native* win32
Python. For native win32 Python, there's a wxPython installer. I just
wanted to warn you that building wxPython for Cygwin could be quite
tricky. And running wxPython over wxGTK over GTK over the Cygwin X
server over the Windows sounds pretty pointless ;-)

I already recommended distutils. If you want to use the Cygwin or Mingw
compiler to compile extensions for native win32 Python, the build
command using disutils is

    python setup.py --compiler=mingw32

Just for kicks, you can build an Windows installer for your module with:

    python setup.py bdist_wininst

or a RPM installer with:

    python setup.py bdist_rpm

Enough advertising distutils for today :-)

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 6.2 °C      Wind: 0.9 m/s




More information about the Python-list mailing list