[Distutils] specifying headers for an extension

Michael Hudson mwh@python.net
Tue Mar 5 08:51:02 2002

"Thomas Heller" <thomas.heller@ion-tof.com> writes:

> From: "Michael Hudson" <mwh@python.net>
> > Achim Gaedke <Achim.Gaedke@uni-koeln.de> writes:
> > 
> > > I need such things too.
> > 
> > > In my case there is the module initialisation in the *module.c file
> > > and some 100 of method definitions in another that is included into
> > > the first.
> > > 
> > > It would be nice if setup.py can handle this.
> > 
> > There's a bug on sf on this, assigned to me.  I'm not likely to get to
> > it soon, I'm afraid.  Patches welcome :)
> > 
> IMO we should allow sources to be instances of a SourceFile class
> in addition to strings.
> Extension(...,
>           sources = SourceFile("spam.c", depends=["spam.h", "spam2.h"]))

You mean

           sources = [SourceFile("spam.c", depends=["spam.h", "spam2.h"])])

here, right?

> I can supply a patch if needed.

That's the only way this is going to get done...

I had some crazy ideas to use "gcc -MMD" to create a database of
dependencies, so this sort of thing could be done automagically, but
this is work.

Somebody print "keep it simple, stupid" on a ream of paper and drop it
on my head, please?


  I've even been known to get Marmite *near* my mouth -- but never
  actually in it yet.  Vegamite is right out.
 UnicodeError: ASCII unpalatable error: vegamite found, ham expected
                                       -- Tim Peters, comp.lang.python