As far as I understood distutils design philosophie (sp?) Greg will not like this.
The CCompiler classes should remain usable outside distutils.
Yes, as I indicated I'm not too comfortable with the CCompiler classes knowing that much about the internals of the "build_ext" command either. The issue of knowing a "safe" place to dump temporary files is again somewhat compiler (and linker) specific. We know that for Microsoft's linker, it's going to automatically create an import library when it creates the DLL. Currently, the decision about where to dump that DLL is made in the build_ext command, thereby making "build_ext" aware of the MSVCCompiler class details. If we could instead just tell the (abstract) compiler where the build_temp directory is, it could do the right thing without build_ext's intervention. Similarly, Borland's linker wants to create a lot of temporary files during the link process. I've found linker options to suppress the creation of most of these files but at least one (the "TDS" file) I don't seem to be able to kill off. But I can tell the linker *where* to put it -- and that's where it would again be useful for my subclass of CCompiler to know where the temporary files should go.