[Distutils] Extensions with cygwin on Python 2.0

Rene Liebscher R.Liebscher@gmx.de
Wed Dec 13 06:19:01 2000

"John J. Lee" wrote:
> What is the current situation with building extensions with Distutils on
> cygwin with the normal MSVC-built Python 2.0 windows binaries?  I can
> build extensions okay (I think) using a makefile, but I'm trying to figure
> out how to use Distutils to do the same thing: is cygwin supported at all?
> Reading a couple of messages here from a month or two ago about building
> Python itself on cygwin, I saw a comment from someone that he didn't know
> if cygwin built extensions worked reliably with the normal MSVC python 2.0
> binary.  As far as I know, they do, but I take it from the comment that
> there isn't any support in Distutils yet?  Does it fit in well with the
> existing structure, since it's kind of two platforms in one, if you see
> what I mean?  Is it likely to be supported in the near future?
Distutils supports cygwin and mingw32 for 6 months or so.

The message you read 
is about compiling the whole python using cygwin. 

> Note that this is using dllwrap -mno-cygwin, which doesn't use any of the
> POSIX stuff from cygwin, which would mean you'd have to have cygwin1.dll
> to use the extension for no particular reason.  The only reason I'm using
> cygwin rather than mingw32 is that it has a convenient command line.

You have to specify 
--compiler=cygwin for cygwin using cygwin1.dll
--compiler=mingw32 for cygwin without using cygwin1.dll (or for mingw32)

What you need is a library libpython20.a which serves as import
library for python20.dll.

If you don't want to create this library for your own you may ask Reuben
for it.

(Greg, it may be a good idea to put this library on the download page of
distutils or python.)

Kind regards
Rene Liebscher