[Distutils] install location(s)

Greg Ward gward@cnri.reston.va.us
Mon, 29 Mar 1999 21:02:14 -0500


Quoth Fred L. Drake, on 29 March 1999:
>   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.

I've sorta been wondering about that myself -- I've had to resort to
dissecting Python Makefiles, doing multiple test installations with
slight parameter tweaks, and taking careful notes on the whole process
to try to figure out what's happening and what Distutils should try to
emulate/enforce/whatever.

One thing that bugs me: there doesn't seem to be an elegant way to have
multiple sub-versions of Python installed on the same machine, eg. 1.5.1
and 1.5.2b2 (or whatever the latest alpha/beta is at a given time).  I
have taken to setting prefix=/usr/local/python-1.5.1 and
prefix=/usr/local/python-1.5.2b2 respectively, and screwing around with
symlinks in /usr/local/bin to get things the way I want them.  Is this
the best anyone has come up with?  It would be nice to subdivide
/usr/local/lib/python1.5, but the fact that Python figures out sys.path
at runtime seems to preclude this.  Are my impressions correct?

        Greg
-- 
Greg Ward - software developer                    gward@cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                      voice: +1-703-620-8990 x287
Reston, Virginia, USA  20191-5434               fax: +1-703-620-0913