[Distutils] The "dist" command

Greg Ward gward@cnri.reston.va.us
Mon, 27 Sep 1999 15:50:39 -0400

On 24 September 1999, Gordon McMillan said:
> Greg wrote:
>     <braindump>
>     Possible modes of operation: 
>     - require an explicit manifest that lists every single file (presumably 
>     along with a way to auto-generate the manifest) 
>     - require an explicit manifest, but allow it to have globs or filename 
>     patterns of some kind (and also have auto-generation) 
>     - allow an explict manifest, but automatically augment it at runtime 
>     with the source files mentioned in 'packages', 'py_modules', and 
>     'ext_modules' (and any other such things that might come along)
> Since you can't possibly anticipate the preferences of every sicko out 
> there, I'd suggest a 2 phase approach. Use specifiers / filters to create 
> an explicit manifest. Let the programmer edit the manifest, then go on 
> to phase 2.

Gordon, Fred, Marc-André:

thanks for your ideas.  They're all, ummm, interesting.  However, I'm
trying to balance simplicity and utility here, and I think my original
manifest syntax does an adequate job of that.  At least it works fine
for generating a source distribution for Distutils 0.1.  The MANIFEST
file is simplicity itself:

    # List of files to ship in the Distutils source distribution (apart from
    # the standard stuff -- Python source files, README and setup script,
    # test scripts).
    # GPW 1999/09/23
    # $Id$

    examples * !*~ !*.py[co]

Gee, I haven't even checked it in yet.  Oh well, I've got *tons* of
changes from the weekend still to checkin.  And then I finish writing
the USAGE file, which should probably be added to the MANIFEST.  (Hmmm:
perhaps the "list of default files" should include /^[A-Z_]+(\.txt)?$/,
to handle README and USAGE and LICENCE and TODO and INSTALL and all
those conventional all-uppercase filenames...)

So yes, I'm ignoring Fred's idea and using the "default" files (all
source files implied by 'py_modules', 'ext_modules', and 'packages',
plus README and setup.py) even when there's a MANIFEST.  And I'm
ignoring Marc-André's idea: there's only one MANIFEST.  I don't need
anything fancy for *my* little module distribution, so it's hard for me
to predict what more complex distributions might throw in.  Oh yeah, I'm
ignoring Gordon's suggestion too: if you want to list every file
explictly, you're welcome to do so!  If you want automated help in doing
so, may I suggest the 'find(1)' command?  >smirk<

Oh, one comment on the idea of separate MANIFESTs for source and binary
distributions: no.  The binary distribution should be built from the
'build' directory; the whole point of that directory is to make
installation and the generation of binary (err, built) distributions
trivial.  The information about what goes in the built distribution
should come from an extra 'build' phase, eg. 'build_doc'.

Wow, I never thought there'd come a day when I would refuse complexity
and featuritis.  This Python thing must be getting to me.  Better go
spend some time hacking Perl to remind myself of the joys of unbridled
complexity.  ;-)

Greg Ward - software developer                    gward@cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                           voice: +1-703-620-8990
Reston, Virginia, USA  20191-5434                    fax: +1-703-620-0913