[Distutils] Suggested directory convention

Greg Ward gward@python.net
Wed, 31 May 2000 20:03:37 -0400


Lots of distribution formats need a place to put files that aren't
really temporary, can often be generated by the Distutils, but may be
tweaked by the developer (and put under source control).  I'm thinking
of RPM's spec files, Debian's directory of package meta-data, Wise
scripts, and similar stuff.

Seems like a good idea to me to put this all in a directory "dist": the
first time you use the Distutils to generate a .spec file, or a Wise
script, or what-have-you, it would create "dist" and would always put
those sort of files in there.  Naturally, this would be a configurable
option to the bdist_* commands, but "dist" strikes me as a sensible
default.

This is distinct from the "build" directory for two reasons: 1) it's for
distribution, not building -- hence the domain of the module developer
rather than the installer/packager; 2) it's not temporary -- it's always
safe to blow away the "build" directory, but could be foolish to ditch
"dist".  (Eg. if someone has started with Distutils-generated files and
customized them to suit.)

In addition to the bdist_* commands, the sdist command could possibly
use the dist tree for creating source archives.  (Currently, it creates
<distname>-<version> (eg. "Distutils-0.8.3") in the distribution root,
fill it up with copies or hardlinks to all the files in MANIFEST, and
creates an archive rooted at <distname>-<version>.  If we move that
source distribution tree down a level, we'd have to chdir to create the
source archive.)

Opinions?  Sound like a good idea or just more complexity?

        Greg
-- 
Greg Ward - nerd                                        gward@python.net
http://starship.python.net/~gward/
When the ship lifts, all bills are paid.  No regrets.