[Distutils] CCompiler signature

Anders J. Munch andersjm@dancontrol.dk
Wed Feb 6 07:30:02 2002


I'm considering writing a no-op CCompiler implementation that instead
of actually compiling anything just outputs which files would have
been compiled and with which options.  The idea is that I'd take this
information and add the files to Setup.local manually, in order to
produce a statically linked executable.  (See
<news:3c5fe73f$0$204$edfadb0f@dspool01.news.tele.dk> on why I want to
do that.)

But reading ccompiler.py I can't figure out what which signature such
a class should implement.  CCompiler claims to be an abstract base
class but is in reality jam packed with implementation.  So which
methods are utility methods that can be ignored and which are part of
the interface which must be implemented for distutils to work?  Does a
compiler implementation class have to derive from CCompiler?

I presume that adding a module with a CCompiler derived class and
giving it an entry in compiler_class is sufficient to implement a new
compiler for distutils, am I right?  I wish there was an overview
document to explain the distutils architecture.

Using python 2.2 on Win2k.

- Anders