[Distutils] Re: CygwinCCompiler, msvc hack, BCPPCompiler

Rene Liebscher R.Liebscher@gmx.de
Fri, 30 Jun 2000 17:08:50 +0200

Greg Ward wrote:
> On 29 June 2000, Norman Vine said:
> > FWIW
> > I compile Python with Cygwin routinely and I do not have "__GNUC__"
> > anywhere in my config.h file
> [...]
> > >>> sys.version
> > '1.6a2 (#12, Jun 22 2000, 08:18:57)  [GCC 2.95.2 19991024 (release-2)]'
> >
> > perhaps checking for "GCC" in sys.version will do what we want :-))
> No; as I understand it, the CygwinCCompiler class will allow you to
> build extensions using GCC (Cygwin or MingW32!) with the stock Python
> binary, as long as you have a libpython.a around.  (It also requires
> changes to Python's config.h, but I believe Fred checked those in a few
> days ago.)
You are both right.
I think Norman compiles it in the UNIX way using configure.
In this case it builds its own config.h and this is definitively
able to be used for extension building with GNU C.

But if you compile it with MSVC or use the downloaded binary
version, then you have this special PC config.h file. And in
this file you need a special section for GNU C. (probably
using #ifdef __GNUC__ somewhere.)

So I will change my code, if it finds GCC in sys.version, then
it doesn't need to check the config.h file.

(Norman, have you already tried to build an extension? It seems
you are only one out there who is also using GNU C. I'm using
currently the mingw32 port, so I need someone which uses 
an up-to-date Cygwin. My Cygwin was an old version (2.91.67)) 

Kind regards

Rene Liebscher