[Distutils] Cache PYTHONPATH? (Re: make unzipped eggs be the default)

David Lyon david.lyon at preisshare.net
Wed Jul 29 06:58:25 CEST 2009


>>P.J. Eby wrote:
>>>So the optimum performance tradeoff depends on how many imports you 
>>>have *and* how many eggs you have on sys.path.  

Spoken like a true master...

and it's imho a real design bludner (blunder)..

sys.path is meant to contain directories for which interpretor
can check for packages.

Adding eggs to sys.path just prioritizes eggs (higher) and means
that anytime a package is imported, virtually every egg must be
opened to check if it has the appropriate package.

imho it's an abuse of the sys.path to do things this way.

Eggs should sit in site-packages directories like any other
package and wait their turn.

.zip/.egg should just be a transport format. The site-package
directory should just hold packages of a like format.

Third party libraries are rarely so big that they need to
be compressed to save disk space.. on any of the systems
that i know about anyway..

</ranting>

David





More information about the Distutils-SIG mailing list