[Distutils] Installation directory

Moore, Paul Paul.Moore@uk.origin-it.com
Tue Oct 24 10:00:01 2000


From: Bastian Kleineidam [mailto:calvin@cs.uni-sb.de]
> >it is installed directly into the
> >C:\Applications\Python20 directory, which is
> >the Python installation directory. This is not
> >what I would want, especially as the default
> >action.
>
> There was a somewhat lengthy discussion
> about installation dirs at the beginning
> of the year, including some mighty words
> from Guido. You can follow the discussion
> on the archives, here is a wrapup:
> http://www.python.org/pipermail/distutils-sig/20
> 00-February/001181.html I think in most cases it
> boils down to installing things in sys.prefix
> and sys.exec_prefix.

OK. So the current behaviour is by design. That's fair enough - I don't
personally like it, but that isn't a good reason for it to change.

> Nothing prevents you from using your custom
> install scheme though (with --install-lib and
> such).

Agreed. I guess that is what I should do. Two questions spring to mind:
1. Is it possible for me to specify a default --install-lib value which will
be used in all installs unless overridden (effectively a site preferences
file for distutils)? If not, is it feasible to add such a thing?
2. What happens with binary distributions? (I've not tried building one of
these yet, so it may be obvious...) Can I install a binary distribution and
specify --install-lib, or is the bdist_wininst version unable to accept
command line overrides?

Actually, a third (Python) question: If I do add a "site library" directory,
what do I need to do to get Python to recognise it by default? Looking at
the documentation of the site module, it looks like Unix has a site-python
directory already, via sys.prefix, whereas Windows doesn't. Should/could I
just set sys.prefix somehow? (Maybe this should be directed to somewhere
like the Python newsgroup, though).

Paul