[Distutils] add new compiler to distutils

Ed Zwart ed.zwart at gmail.com
Tue Jun 16 21:23:28 CEST 2009

Did you ever get this figured out?

I am having trouble just using zc.buildout with non-KGS packages, but
mingw seems to do its thing just fine with the KGS.

I get the following error:

Installing app.
Getting distribution for 'zope.security'.
error: Setup script exited with error: don't know how to compile C/C++
code on platform 'nt' with 'mingw32-gcc-3.4.5' compiler
An error occured when trying to install zope.security 3.7.0.Look above
this message for any errors thatwere output by easy_install.
  Installing app.
  Getting distribution for 'zope.security'.
Error: Couldn't install: zope.security 3.7.0

On Apr 27, 12:20 pm, patrick flaherty <p... at well.com> wrote:
> Hi,
> Relatively new to python (and very new to distutils) but experienced
> programmer.
> I'm trying to do a 64 bit build ofhttp://sourceforge.net/projects/pyopenssl/
> I'm on Windows Server 2008 R2.  First had to acquaint myself with
> mingw32.  That built but the DLLs (or rather PYDs) that are created
> won't load at runtime.  I transferred the build to a 32 bit machine; the
> PYDs loaded; and the program ran successfully.  Thus, as I said, I'm
> looking to rebuild in 64 bits.
> It's seems that there's a 64 bit version of mingw in development on
> sourceforge:  http://sourceforge.net/projects/mingw-w64.  You download a
> toolchain; add that to your Windows PATH;  and I'm able to build a
> sample hello.c successfully.
> The problem is with Python and setup.py.  When I try to specifycompiler
> i86_64-mingw32 or some variant to setup.py, I get the following:
> > L:\pf\Python\pyOpenSSL>setup.py build_ext -Ic:\openssl\include -c
> > x86_64-pc-mingw32
> > running build_ext
> > error: don't know how to compile C/C++ code on platform 'nt' with
> > 'x86_64-pc-mingw32'compiler
> So after fumbling around a bit, where I've arrived at is that in the
> distutils package ( c:\python26\lib\distutils ) there are various files
> such as msvccompiler.py, msvccompiler9.py (I have VS 2008 installed),
> ccompiler.py and cygwincompiler.py that would seem to indicate that
> 'new' compilers have to have support built into distutils.
> Is this correct, and if so, how does one go about the task of adding a
> newcompiler?
> thanx - pat
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-... at python.orghttp://mail.python.org/mailman/listinfo/distutils-sig

More information about the Distutils-SIG mailing list