[Distutils] PEP 376 - site-directories and site.addsitedir
p.f.moore at gmail.com
Thu May 14 17:01:55 CEST 2009
2009/5/14 David Lyon <david.lyon at preisshare.net>:
> On Thu, 14 May 2009 14:38:07 +0100, Paul Moore <p.f.moore at gmail.com> wrote:
>> 2009/5/14 Tarek Ziadé <ziade.tarek at gmail.com>:
>> I'm not sure how well-defined that is. Can you precisely define what a
>> "site-packages directory" is?
> Site-packages is referenced from the "original" site.py code.
> It is a place from my reading where all packages common for the python
> installation are stored. It is the site repository for all extra packages.
> It's specifically hardcoded with an
> os.path.join(python-path,"lib","site-packages") command.
> Specifically, what about the Windows
>> registry items under HKLM\Software\Python\PythonCore\x.y\PythonPath?
>> There may be other "special" locations, I can't recall for certain.
> There's a user-packages location under python 2.6
> But it's use hasn't been picked up. If it was under linux then the
> equivalent would possibly be ~/.user-packages.
No, the registry stuff is completely different - it has been in
Windows Python for a long time (probably back as far as 1.5 or
earlier). It's not often used, but it's in addition to PYTHONPATH. I
think older versions of pywin32 used it but newer versions don't seem
to. I suspect it's not used much - but it's bound to be used in some
The main point here is to emphasize that there are some fairly obscure
ways for directories to end up in sys.path, even if we exclude user
code. The proposal needs to make a statement on how all such cases are
handled - I don't have any particular opinion on *what* should happen,
just that it gets documented.
More information about the Distutils-SIG