[Distutils] install location(s)

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Mon, 29 Mar 1999 17:33:02 -0500 (EST)

Andrew Dalke writes:
 > 1)
 > What is the correct location for "pure" python module installations?
 >  $(prefix)/lib/python$VERSION/site-packages
 > or
 >  $(prefix)/lib/site-python

  site-python/ is the original location, but never had a
platform-specific counterpart.  site-packages/ was intended to solve
this, which is why it comes in both flavors, and deals with version-
related issues.
  In general, 100% Python packages should be installed in
site-packages/, because not all packages are sure to work across major 
version changes: it's too easy to rely on the bahavior of bugs in the
library.  ;-(  This results in the safest (most conservative)
installation and allows for faster detection on libraries which are
not available for the Python version:  ImportError is harder to
misinterpret than buggy behavior.
  Only use site-python/ if you really are confident that your package
will stand the test of Python interpreter updates.  Unless there is a
major problem with diskspace, just don't do this!
  Packages that contain native code should install in

 > As I understand it now, the python specific .so files need to be
 > on the PYTHONPATH, which currently contains no information about

  This varies by platform, but I don't think the various binary
flavors for SGIs are indicated; the directories on sys.path which are
platform-specific are either computed from $exec_prefix or contain
Python modules under $prefix that are only meaningful for the
  I presume each of these platform variations would get a different
$exec_prefix, or the distinction would be hidden at a lower level
(such as mounting a filesystem at a common point based on binary
flavor; not hard with NFS).  


Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives