generate MANIFEST from CVS
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 -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://mapit.de/
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
Rene Liebscher <R.Liebscher@gmx.de> writes:
Bernhard Herzog wrote:
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.)
Well, the reason I think it might be useful to have the MANIFEST.cvs in addition to the MANIFEST.in is that it may be useful to autogenerate part of MANIFEST from CVS and add or remove some specific files. If I generate MANIFEST directly I'll have to create my own mechanisms for this sort of thing and lose some of the automatism distutils provides.
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.)
Ok. That's a solution to that part of the problem. I think for a start I'll write my own sdist command as an extension of the standard sdist that simply builds the MANIFEST file and then calls the base-class' run method. Thanks, Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://mapit.de/
participants (2)
-
Bernhard Herzog
-
Rene Liebscher