[Distutils] test for compiler on Windows?

M.-A. Lemburg mal@lemburg.com
Mon Jul 1 04:35:01 2002


Just van Rossum wrote:
> On Windows, how can I detect in my setup.py whether there is a compiler
> available? I have one C extension in my package which is entirely optional, and
> I would like "python setup.py install" to skip building the extension if there's
> no compiler available.

The best way to do this is to subclass the build_ext command
and make compiling the extension optional.

See mxSetup.py in the latest egenix-mx-base beta for an example.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/