[Distutils] generate MANIFEST from CVS

Rene Liebscher R.Liebscher@gmx.de
Tue Aug 28 10:00:01 2001


Bernhard Herzog wrote:
> 
> 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
> default.
> 
> 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.
> 
> Thoughts?
> 
>    Bernhard
> 
It is not necessary to add such a MANIFEST.cvs file. If you are start
creating a file which contains filenames, you could also write a
complete
MANIFEST file. (So you don't need a MANIFEST.in file.) 

If a MANIFEST file contains its own name, it is also included
in the source distribution. (People who want to run another sdist on 
this unpacked distribution would use this file. Except there is a 
newer MANIFEST.in file.)

Rene