[Distutils] Compiler abstractiom model
Wed, 31 Mar 1999 01:39:19 -0800
Greg Ward wrote:
> Quoth Andrew Dalke, on 29 March 1999:
> > C++ template instantiation
> > For at least some compilers, the compilation flags must be
> > passed to the linker, because the linker instantiates templated
> > code during a "pre-link" step so needs to know the right
> > compilation options.
> Ouch! I *knew* there was a reason I disliked C++, I just couldn't put
> my finger on it... ;-) Maybe we should cop out and only handle C
> compilation *for now*? Just how many C++ Python extensions are out
> there now, anyways?
Enough that you can't simply punt it. For example, most of the win32
extensions are actually C++ stuff. LLNL also uses C++, I believe.
> > Is there any way to get the list of include files (eg, the
> > initial/default list)?
> Oh, probably. I just haven't documented it. ;-) I think David Ascher's
> idea of exposing the actual list might be nicer overall -- I'll reply to
> his post separately.
This is V1. Keep it dirt simple. Don't create a bazillion APIs. Expose
the stuff, let people fill it in, and go.
Even better: rather than doing the configuration thru code, do it
declaratively where you can. e.g. a file that can be read by
Also: in your original email, you talked about "factories" and "abstract
classes" and crap like that. What are you building? Who needs a factory?
Just instantiate some class and go.
Python is easy to change and to rewrite. I really dislike seeing people
get all wrapped up in a huge design session to create the ultimate API
when they'd be better served just writing some code and running with it.
Change it later when it becomes necessary -- change is cheap in Python.
> > I believe at times the order of the -l and -L terms can be
> > important, but I'm not sure. Eg, I think the following
> > -L/home/usa/lib -lfootball -L/home/everyone_else/lib -lfootball
> > lets me do both (American) football -- as in Superbowl -- and
> > soccer (football) -- as in World Cup. Whereas
> > -L/home/usa/lib -L/home/everyone_else/lib -lfootball -lfootball
> > means I link with the same library twice.
> Auuugghhh!!! This seems like a "feature" to avoid like the plague, and
> probably one that's not consistent across platforms. Can anyone back up
> Andrew's claim? I've certainly never seen this behaviour before, but
> then I haven't exactly gone looking for such perversion.
Trying linking against Oracle sometime. You're *required* to list a
library multiple times. It's really nasty -- they've created all kinds
of inter-dependencies between their libraries.
Greg Stein, http://www.lyra.org/