[Distutils] CCompiler signature
Anders J. Munch
Wed Feb 6 10:43:02 2002
> "Anders J. Munch" wrote:
> > Does a
> > compiler implementation class have to derive from CCompiler?
> It probably should since CCompiler is not an abstract class, but
> a base class with lots of working method implementations.
Right, CCompiler is not an abstract class however the docstring and
several comments say otherwise. Supposedly the implementations are
just "utility methods" which are there for the convenience of
subclasses but not required.
> > 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.
> I'd try to take one of the existing compiler modules and
> simply replace the compile and link methods with implementations
> which write the information you require to some external file.
Just compile and link? Not set_executable or add_library or
link_executable or library_option or ... ? The problem with modifying
one of the existing concrete classes is that they don't override the
same set of methods that I'll want to override. I just want to know
which methods constitute the public interface used by CCompiler
clients so that I can override those and only those.