[Distutils] RE: [Python-Dev] PEP 250 - site-packages on Windows:
(Was: [Distutils] Package DB: strawman PEP)
Thu, 12 Jul 2001 15:46:52 +0200
"Moore, Paul" wrote:
> From: M.-A. Lemburg [mailto:email@example.com]
> > They should be in the CVS tree of Python on SourceForge.
> I don't have CVS access, so I can't get at these, unfortunately...
There should be a tarball of the CVS archive available somewhere
> > About the change: I think distutils should lookup the path in Python's
> > site.py file - that way you assure that distutils will work on all
> > Python installations rather than only on those which have the site.py
> > patch. Otherwise, Python won't find the packages installed in
> > Lib/site-packages.
> I'm not sure what you intend, here. site.py doesn't export this directory -
> it is just one of the directories which gets added to sys.path in site.py.
> On Unix, there are more than one such directory (both version-specific and
> version-independent), so there isn't, in general, just one such directory. I
> don't know how you could encapsulate this in a way which would not clash
> with other platforms' policies.
> The intention of this change was to be the smallest possible change which
> would work. I believe it (or at least, the patch I sent when I submitted the
> final version of the PEP) does that for everything except the Windows
> Installer. I'll have to defer judgement on how best to address that area to
> others better qualified to comment, but see my message to Thomas for my
Well, site.py could be modified to set a symbol in the sys module
which could then be queried by distutils, e.g. sys.extinstallprefix.
Alternatively, distutils could be made to default to
Lib\site-packages and then revert to Lib\ in case this directory
is not available.
BTW, I don't think that using Windows registry keys for determining the
installation path is a good idea -- this information should be kept
in the site.py or sitecustomize.py module for easy editing.
CEO eGenix.com Software GmbH
Consulting & Company: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/