[Distutils] The "dist" command

M.-A. Lemburg mal@lemburg.com
Tue, 28 Sep 1999 00:18:06 +0200

Greg Ward wrote:
> 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'.

How does that work ? I usually let my pkgcreate run over the
same package tree twice: once for source distribution and then
again for a binary one -- pretty easy I'd say and without *any*
overhead on my part since the default file inclusion/exclusion
sets are chosen by sinlge option on the command line.

> 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, what we proposed here is not featuritis, it's plain
experience. All of the mentioned things are needed one way
or another.

Anyway, I guess that a simple tool to create the
MANIFEST file will probably already do the trick for all of
us. Perhaps you could add an option to choose the filename for it...
e.g. -M <MANIFEST-filename>. Or have the dist tool look for
a MANIFEST.py file and let it return the list of files to
process via a get_files() API.

Marc-Andre Lemburg
Y2000:                                                    98 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/