RE: [Distutils] Installation directory

From: Bastian Kleineidam [mailto:calvin@cs.uni-sb.de]
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.
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

Actually, a third (Python) question: If I do add a "site library"
directory,
Or add it to the registry in HKLM\Software\Python\PythonCore\2.0\PythonPath, or make a file named sitecustomize.py in your Python root directory that imports sys and inserts or appends to sys.path directly. -- Robin Dunn Software Craftsman robin@AllDunn.com http://wxPython.org Java give you jitters? http://wxPROs.com Relax with wxPython!

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

Actually, a third (Python) question: If I do add a "site library"
directory,
Or add it to the registry in HKLM\Software\Python\PythonCore\2.0\PythonPath, or make a file named sitecustomize.py in your Python root directory that imports sys and inserts or appends to sys.path directly. -- Robin Dunn Software Craftsman robin@AllDunn.com http://wxPython.org Java give you jitters? http://wxPROs.com Relax with wxPython!

On 24 October 2000, Moore, Paul said:
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!!
participants (4)
-
Bastian Kleineidam
-
Greg Ward
-
Moore, Paul
-
Robin Dunn