[Distutils] distutils & Borland's free compiler

Lyle Johnson jlj@cfdrc.com
Mon, 8 May 2000 10:24:15 -0500


> Excellent!  Please do it!  I assume you are aware that the starting
> point is msvccompiler.py; let me just *strongly* encourage you to
> refactor common code out of the MSVCCompiler class and
> whatever-you-write (BorlandCCompiler?) rather than submitting a patch
> with lots of overlapping code.

Maybe I need to double-check the architecture of the distutils with you. It
appeared that I (basically) needed to do two things:

 1. Create a new class (I was calling it BCPPCompiler, but I'm not too
    attached to that name ;) which is derived from CCompiler. This class
    lives in its own module file "bcppcompiler.py" so that it is on the
    same footing as "msvccompiler.py" (which supports that other company's
    compiler).

 2. Patch distutils/ccompiler.py to add this new compiler into the
    compiler_class dictionary.

 3. Ask Greg about how to let the end-user actually override the default
    compiler choice for platform "nt". This could be done by passing the
    keyword argument compiler=bcpp to the new_compiler() factory function,
    if we had some kind of commmand-line option to let the user do that...

Three! Three things!

Lyle