[Distutils] Random bits

Greg Ward gward@cnri.reston.va.us
Mon, 29 Nov 1999 09:03:09 -0500

On 27 November 1999, A.M. Kuchling said:
> Some things I came across while adding distutils support to some code:
> 	* From a docstring in distutils/versions.py:
>         0.4       0.4.0  (these two are equivalent)
>         0.4.1
> Does this mean that 0.4.1 is equivalent to 0.41 in the strict
> versioning class?  I'd suggest adding that, just to make it crystal
> clear.

That is not currently the case, and I think the "strict" version regex
-- as well as the semantics attached to its bits and pieces -- would
need some work for that to happen.  It seems attractive at first blush,
but I'm not entirely sure that it's a good idea.  "0.4.1 == 0.41"
sort-of implies "1.11 == 1.1.1", which is definitely *not* attractive.

ESR's "Software Release Practices HOWTO" argues in favour of
major.minor.patch version numbering, and I agree with that.  See


> 	* The name option in setup.py: It's not clear if it can/should
> contain spaces; given that you mention underscores, I assume they're
> as space substitutes.  

From the USAGE file, line 947 or so:

      the name and version number of the module distribution.  The name
      should be brief, descriptive, and unique across all Python module
      distributions.  It is used to build filenames and directory names
      (and, someday, database records, web pages, etc.), so should not
      contain any punctuation except *possibly* underscores.  The
      version number should be a reasonably normal-looking version
      number; there are no strict requirements for what a version
      number should be, but there will someday be guidelines: see 
      distutils/version.py for details.  Both of these are required
      by the 'dist' command.

...which probably just means I need to work on the documentation.

> 	* Building a distribution: it creates hard links to files.
> This means that if you delete a file and rebuild the dist without
> erasing the hard-link-filled subdir, the deleted file is still present
> in the distribution.  It's probably easiest to blow away the whole
> <product>-<version> directory, rather than attempting to scan its
> contents and update it.

Yeah, good point.  The "dist" command is broken in a number of other
stupid ways -- it was a very quick and dirty hack cobbled together so I
could say "setup.py dist" to make the Distutils 0.1 release.  It works
for putting together the Distutils release, but isn't much good for
anything else.  ;-(  See my next post...

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