[Distutils] Header dependencies when building extensions

Andrew Kuchling akuchlin@mems-exchange.org
Wed Dec 11 16:22:13 2002


On Tue, Dec 10, 2002 at 03:53:38PM +0200, Nick Patavalis wrote:
>If, for example, the "foo" extension is built from "foo.c" which
>includes "foo.h", how can I make distutils rebuild the extension when
>"foo.h" changes?

Python 2.3 CVS has a 'depends' argument for specifying additional
dependencies; something like:
   Extension('foo', ['foomodule.c'], 
             depends = ['foo.h'])

This is a new feature, so it probably won't be back-ported to Python
2.2.

--amk