building C modules in windows + Python 2.3 + cygwin

Jason Tishler jason at tishler.net
Thu Feb 5 15:11:25 EST 2004


Andreou,

On Thu, Feb 05, 2004 at 07:13:45PM +0200, Andreou Giannis wrote:
> Allthough it is possible to build modules in Python2.3.3 and distutils
> with cygwin, by running:
>     setup.py build --compiler=cygwin

AFAICT, you should use --compiler=mingw32, if you want to create a
native Win32 Python extension:

    $ python setup.py --dry-run build --compiler=mingw32
    running build
    running build_ext
    building 'readline' extension
    C:\Cygwin\bin\gcc.exe -mno-cygwin ...
                          ^^^^^^^^^^^

Using --compiler=cygwin, I get the following:

    $ python setup.py --dry-run build --compiler=cygwin
    running build
    running build_ext
    building 'readline' extension
    C:\Cygwin\bin\gcc.exe -mcygwin ...
                          ^^^^^^^^

which should produce a Cygwin Python extension.

> Is there a workaround for this problem?

I don't know.

> Can i simply copy the module file in the proper directory?

Yes.  FWIW, this is how I install the Win32 Python readline module
every time I upgrade my Win32 Python installation...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6




More information about the Python-list mailing list