[Distutils] specifying headers for an extension

Thomas Heller thomas.heller@ion-tof.com
Tue Mar 5 05:33:02 2002


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"]))

I can supply a patch if needed.

Thomas