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

Tarek Ziadé ziade.tarek at gmail.com
Thu May 14 12:03:21 CEST 2009


Hello

for PEP 376, I have one last fuzzy point.

http://svn.python.org/view/peps/trunk/pep-0376.txt?view=markup

The "get_egg_info" api is currently based on scanning the whole
sys.path. And since sys.path can be modified by people,
so the algorithm is linear and can slow down when there are a lot of paths.

I have a proposal: let's restrict the search for this API to
site-package directories only. (directories added with
site.addsitedir)

People will be able to mark add any directory (like the per-user
site-package directory - http://www.python.org/dev/peps/pep-0370)

This requires to add in site.py a registry to keep track of all
directories added through site.addsitedir

Any thoughts ?

(In the meantime, I'll propose the inclusion of a sitedir list in
site, in Python-ideas)

++
Tarek
-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list