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

Martin v. Loewis martin@v.loewis.de
14 Jun 2002 09:04:18 +0200


Skip Montanaro <skip@pobox.com> writes:

>     Martin> Can you provide a specific example to support this criticism?
>     Martin> Could you also explain how generating makefiles would help?
> 
> >From python-list on June 10 (this is what made me wish yet again for better
> dependency checking):
> 
>     http://mail.python.org/pipermail/python-list/2002-June/108153.html

That does not answer my question: How would generating a makefile have
helped?

Notice that setup.py *will* regenerate nis.so if nis.c changes. The OP
is right that it refused to do so because, meanwhile, he had changed
Setup to build nismodule.so instead.

This is where the real problem lies: that building modules via
makesetup generates module.so, whereas building modules via setup.py
builds .so. This needs to be fixed, and I feel that setup.py is right
and makesetup is wrong.

> It's clear nobody but me wants this

Hard to tell, since I still don't quite get what "this" is. Generating
makefiles: certainly I don't want this. The reason is not that I think
there are no problems - I think that generating makefiles will not
solve these problems.

> though I find it hard to believe most of you haven't been burned in
> the past the same way the above poster was.

The specific problem comes from building shared modules through
Setup. I never do this, so I have not been burned by that.

> Frequently, after executing "cvs up" I see almost all of the Python core
> rebuild because some commonly used header file was modified, yet find that
> distutils rebuilds nothing.  

That I noticed. It has nothing to do with the article you quote,
though, and I question that generating makefiles would help.

I routinely rm -rf build when I see that some common header has
changed.

> 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.

I can reproduce your observations. I still don't see how generating
makefiles will help to solve this problem.

Regards,
Martin