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

Michael Hudson mwh@python.net
14 Jun 2002 10:48:54 +0100


martin@v.loewis.de (Martin v. Loewis) writes:

> Jeremy Hylton <jeremy@zope.com> writes:
> 
> > Only if distutils grows a way to specify all those dependencies.  Once
> > you've specified them, I'm not sure why it is difficult to check them
> > in Python code instead of relying on make.
> 
> I believe people normally want their build process to know
> dependencies without any specification of dependencies. Instead, the
> build process should know what the dependencies are by looking at the
> source files.
> 
> For C, there are two ways to do that: you can either scan the sources
> yourself for include statements, or you can let the compiler dump
> dependency lists into files. 
> 
> The latter is only supported for some compilers, but it would help
> enourmously: when compiling the first time, you know for sure that you
> will need to compile. When compiling the second time, you read the
> dependency information generated the first time, to determine whether
> any of the included headers has changed. If that is not the case, you
> can skip rebuilding. If you do rebuild, the dependency information
> will be updated automatically (since the change might have been to add
> an include).

$ cd ~/src/sf/python/dist/src/Lib/distutils/command/
$ ls -l build_dep.py
-rw-rw-r--    1 mwh      mwh           763 Apr 13 11:18 build_dep.py

Had that idea.  Didn't get very far with it, though.  Maybe on the
train to EuroPython...

Cheers,
M.

-- 
  The gripping hand is really that there are morons everywhere, it's
  just that the Americon morons are funnier than average.
                              -- Pim van Riezen, alt.sysadmin.recovery