[Python-Dev] Where to install non-code files
Greg Ward
gward@python.net
Thu, 25 May 2000 22:22:03 -0400
Another one for the combined distutils/python-dev braintrust; apologies
to those of you on both lists, but this is yet another distutils issue
that treads on python-dev territory.
The problem is this: some module distributions need to install files
other than code (modules, extensions, and scripts). One example close
to home is the Distutils; it has a "system config file" and will soon
have a stub executable for creating Windows installers.
On Windows and Mac OS, clearly these should go somewhere under
sys.prefix: this is the directory for all things Python, including
third-party module distributions. If Brian Hooper distributes a module
"foo" that requires a data file containing character encoding data (yes,
this is based on a true story), then the module belongs in (eg.)
C:\Python and the data file in (?) C:\Python\Data. (Maybe
C:\Python\Data\foo, but that's a minor wrinkle.)
Any disagreement so far?
Anyways, what's bugging me is where to put these files on Unix.
<prefix>/lib/python1.x is *almost* the home for all things Python, but
not quite. (Let's ignore platform-specific files for now: they don't
count as "miscellaneous data files", which is what I'm mainly concerned
with.)
Currently, misc. data files are put in <prefix>/share, and the
Distutil's config file is searched for in the directory of the distutils
package -- ie. site-packages/distutils under 1.5.2 (or
~/lib/python/distutils if that's where you installed it, or ./distutils
if you're running from the source directory, etc.). I'm not thrilled
with either of these.
My inclination is to nominate a directory under <prefix>lib/python1.x
for these sort of files: not sure if I want to call it "etc" or "share"
or "data" or what, but it would be treading in Python-space. It would
break the ability to have a standard library package called "etc" or
"share" or "data" or whatever, but dammit it's convenient.
Better ideas?
Greg
--
Greg Ward - "always the quiet one" gward@python.net
http://starship.python.net/~gward/
I have many CHARTS and DIAGRAMS..