[Distutils] generate MANIFEST from CVS

Bernhard Herzog bh@intevation.de
Tue Aug 28 09:21:00 2001

Hi all,

over the last few weeks, I've been using distutils for the first time on
a real and non-trivial project and so far it works fine. I am currently
tweaking the MANIFEST.in file to include all the files that have to be
distributed and no others. This turns out to be quite time-consuming
because there are quite a few files with that aren't included by

It seems to me that for a project managed by CVS there's a much more
convenient way to get at the list of files. Normally, all files
controlled by CVS should be distributed. In most cases, that will be
enough, but there may some generated files that should be included
anyway, such as perhaps swigged wrappers so that he user doesn't have to
install SWIG to compile a package.

Getting the list of files under CVS control is quite simple, you just
extract them from the CVS/Entries files and recurse into subdirectories
which are under CVS control.

I'm not sure yet how to integrate this with distutils properly. At the
moment I think having a cvs command in MANIFEST.in would be best. That
way you could add or remove files from the list of CVS controlled files.

The one problem I see with that is that when you unpack a source
distribution its impossible to generate the list of CVS controlled files
again, so another setup.py sdist command won't include all the files.
This is easy to work round though, as you can simply distribute a
MANIFEST.cvs file containing the CVS filenames which would have to be
included in the MANIFEST somehow. 

The cvs command could do this, too: if run in a directory checked out
from CVS, i.e. if CVS/Entries exists, generate the list of
CVS-controlled files, write them into MANIFEST.cvs and include them in
MANIFEST. If not run in a CVS directory, MANIFEST.cvs must exist and the
files listed there are included in MANIFEST. In both cases MANIFEST.cvs
will have to be in MANIFEST, too.



Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                               http://mapit.de/