[Python-Dev] Standard install locations for Python ?

M.-A. Lemburg mal@lemburg.com
Thu, 18 Jan 2001 18:30:52 +0100


"Martin v. Loewis" wrote:
> 
> > Where should Python extensions install themselves and their docs?
> 
> I feel that extensions should not need to care. For extensions,
> distutils will pick a location, and the system administrator
> configuration the package can chose a different location.
> 
> Unfortunately, distutils does not support the installation of
> documentation, which I think it should.

Right.
 
> Now switching sides, as an administrator, I'd wish distutils to follow
> the system conventions by default.
> 
> That means on Linux, documentation should go into the system's <doc>
> directory, which is /usr/share/doc according to latest
> standards. Distributions vary, so distutils should find out - e.g. by
> querying the location from rpm. In addition, when building RPMs,
> distutils should declare these files as %doc in the spec file, so RPM
> will install it following the system conventions.

You currently have to do this by hand (e.g. in setup.cfg or
using the doc_files option). It should fairly easy to add
a command similar to install_data though which then applies
all the necessary magic to the paths.

If there a common landmark to look for on Unix (e.g. in case the
system does not use RPM) ?

Which paths should distutils check ?

(/usr/share/doc/packages, /usr/share/doc, /usr/doc/packages,
/usr/doc in that order ?)
 
> On Windows, the convention apparently is to put the documentation
> "nearby" the software, so it should probably go into Doc or a
> subdirectory thereof.

Na, I'd rather have \Python\Site-Packages and \Python\Site-Docs
for that purpose.
 
> On Unix, there appears to be no standard location, unless the
> documentation consists of man pages or perhaps info files. So
> <prefix>/share/doc is probably a place as good as any other.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/