[Distutils] Cygwin to build modules for the Win32 Python2.2 distribution ?

Gregor Hoffleit gregor@hoffleit.de
Mon Mar 4 11:57:01 2002


Hi,

I'm trying to build an extension module for the Python22.exe
distribution from www.python.org. I'm using a current Cygwin environment
and a trivial Distutils setup.py script.

The build fails, appearently during a sanity check for LONG_BIT. AFAICS,
the failure is due to differences between the VC compiler used for
Python22.exe, and the GCC 2.95.4 using in Cygwin:

    madonna:1> python setup.py build --compiler=cygwin
    running build
    running build_ext
    building 'leapi' extension
    C:\cygwin\bin\gcc.exe -mcygwin -mdll -O -Wall
    -I/usr/local/stow/leapi/include -IC:\PROGRAMME\PYTHON22\include -c leapi_wrap.c -o build\temp.win32-2.2\Release\leapi_wrap.o
    In file included from C:/PROGRAMME/PYTHON22/include/Python.h:59,
		     from leapi_wrap.c:35:
    C:/PROGRAMME/PYTHON22/include/pyport.h:437: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
    error: command 'gcc' failed with exit status 1

Is Distutils supposed to support this situation ? (From what I understand
from other mailing lists, it is possible to setup the Cygwin GCC in
order to build extensions modules compatible with Python22.exe.)

Are there any additional switches to tune Distutils for this situation ?

Thanks,

    Gregor