[Distutils] The "dist" command

Greg Ward gward@cnri.reston.va.us
Mon, 27 Sep 1999 18:34:25 -0400

On 28 September 1999, Mikael Lyngvig said:
> Manifest files should be as explicit as possible.  I.e., wildcards should
> only be allowed in a preprocessor tool for generating the initial manifest
> file.  The reason for this is simply that you don't want to accidentally
> ship your boss' latest hate mail to you, because you accidentally saved it
> in the source directory :)  (so, I prefer the 'make_manifest' approach)

Hmmm, good point.  Looks like manifest files are shaping up to be one of
those personal/religious issues that will just have to allow different
ways of using them.  You'll never find me using a two-phase manifest as
you and Gordon advocate, but I have no problem using the machinery in
distutils.command.dist to write a "make_manifest" script for those who
like this modus operandi.  (Err, I should say you'll never find me
working this way until *I* accidentally ship the boss' latest hate
mail... ;-)

> As for 'find', I am still, extremely slowly, working on Python replacements
> for the most common Unix/GNU utilities.  It would be kind of nifty to have a
> 'find' module written so generically, using keyword parameters, that you
> could use if from your own Python scripts:
>    User = os.environ["USER"]
>    Edits = posixcmd.find("/src", perm="-u+w", name="*.c", type="f",
> user=User)

*BZZT* *BZZT* Off-topic alert!  But I can't resist...

1) What's wrong with os.path.walk()?  (Apart from the fact that it's
buried in os.path where it would never occur to anyone in a million
years to look for it.)  2) How would you handle find's ability to
combine options booleanologically?  Won't work with this syntax --
that's why you need something like os.path.walk, to which you supply a
test function.  3) If you used CVS, then you would just need to say "cvs
status" to find out which files aren't checked in.  (Or better yet, my
"cvstatus" script, which gives a much more readable version of this. ;-)

Off topicologically yours,

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