[Python-Dev] addressing distutils inability to track file dependencies
Guido van Rossum
guido@python.org
Thu, 13 Jun 2002 22:05:00 -0400
> Here's a simple test you can perform at home. Build Python. Touch
> Include/Python.h. Run make again. Notice how the core files are all
> rebuilt but no modules are. Touch Modules/dbmmodule.c (or something else
> that builds). Run make again.
Most of the time most of the rebuilds of the core are unnecessary.
> I'm simply going to stop worrying about it and just keep deleting all the
> stuff distutils builds to make sure I get correct shared libraries.
Because we are religious about binary backwards compatibility, it is
very rare that a change to a header file requires that extension are
recompiled. But when this happens, it is often the last thing we
think of when debugging. :-(
I think the conclusion from this thread is that it's not the checking
of dependencies which is the problem. (Jeremy just added this to
distutils.) It is the specification of which files are dependent on
which others that is a pain. I think that with Jeremy's changes it
would not be hard to add a rule to our setup.py that makes all
extensions dependent on all .h files in the Include directory -- a
reasonable approximation of the rule that the main Makefile uses.
--Guido van Rossum (home page: http://www.python.org/~guido/)