[Distutils] Installation directory

Greg Ward gward@python.net
Tue Nov 7 22:15:03 2000


On 24 October 2000, Moore, Paul said:
> 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?

Create distutils.cfg in the Distutils package dir -- typically
C:\Python\Lib\distutils on Windows.  Contents:

[install]
install-lib=C:\Python\SiteLib

for whatever value of "C:\Python\SiteLib" you prefer.

For the record, this *is* documented now.  Should be in Fred's latest
doc snapshot, which I think is on SourceForge.

Then make sure that this is always added to Python's search path.
There's more than one way to do it (oops! did I say that on a *Python*
list? ;-), but the easiest and most straightforward is a .pth file.
Eg. create "site.pth" in C:\Python, containing exactly one line:
"SiteLib".  (This should work because "SiteLib" is relative to
"C:\Python".)

Completely untested, off-the-cuff, no idea if it'll work on Windows,
use at your own risk, etc. etc.

        Greg
-- 
Greg Ward - programmer-at-big                           gward@python.net
http://starship.python.net/~gward/
I have the power to HALT PRODUCTION on all TEENAGE SEX COMEDIES!!