[Distutils] PEP 376 - site-directories and site.addsitedir

David Lyon david.lyon at preisshare.net
Thu May 14 17:10:30 CEST 2009

On Thu, 14 May 2009 16:01:55 +0100, Paul Moore <p.f.moore at gmail.com> wrote:
> 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.

My take on it is that sys.path get's messed with too easily.

Any item added in sys.path causes a full directory search to happen
which is fairly time consuming.

The best solution in performance is one where sys.path is limited to
a handful of entries (say ./, user-packages, site-packages) and
any packages that are stored are referenced in .PTH files along those
three paths.

Of course, I'm being way too simplistic here... and in the real
world many systems aren't like that.... yet.... lol

but who knows what the future can bring....


More information about the Distutils-SIG mailing list