[Python-Dev] addressing distutils inability to track file dependencies

M.-A. Lemburg mal@lemburg.com
Fri, 14 Jun 2002 10:04:24 +0200

Martin Sj=F6gren wrote:
> On Thu, Jun 13, 2002 at 10:05:00PM -0400, Guido van Rossum wrote:
>>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.
> I for one would love to have dependencies in my extension modules, I
> usually end up deleting the build directory whenever I've changed a hea=
> file :(
> How about something like this:
>   Extension('foo', ['foo1.c', 'foo2.c'], dependencies=3D{'foo1.c':
>   ['bar.h'], 'foo2.c': ['bar.h', 'bar2.h']})
> though there is the problem of backwards compatability :/

Just curious:

distutils, as the name says, is a tool for distributing
source code; that doesn't have much to do with developing code
where dependency analysis is nice to have since it saves compile

When distributing code, the standard setup is that a user unzips
the distutils created archive, types "python setup.py install"
and that's it. Dependency analyis doesn't gain him anything.

Now if you want to use distutils in the development
process then you have a different mindset and therefore
need different tools like e.g. scons or make (+ makedep, etc.).

The question is whether we want distutils to be a development
tool as well, or rather stick to its main purpose: that of
simplifying distribution and installation of software (and
thanks to Greg, it's great at that !).

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/
Meet us at EuroPython 2002:                 http://www.europython.org/