[Distutils] formencode as .egg in Debian ??
"Martin v. Löwis"
martin at v.loewis.de
Tue Nov 22 23:41:06 CET 2005
Phillip J. Eby wrote:
>> If you have many zipfiles on sys.path, all applications will suffer
>> from having to read the TOC of all those zipfiles, even if they need
>> none of them. OTOH, if you had packages inside site-python, the
>> contents of the unused packages is simply ignored.
> I'm sorry, but this is, shall we say, "fact challenged"? .pth files'
> contents are added to the *end* of sys.path. This means that stdlib
> imports and normal site-packages imports are satisfied *before* any
> hypothetical overhead from .pth entries, whether they're zipfiles or
Correct. I was not talking about stdlib imports. I was talking about
imports satisfied from the end of sys.path, or imports resulting in
> If Python never reaches the .pth entries at runtime, it
> will not even read the zipfile TOCs, let alone attempting to stat() for
> contained packages.
Correct. However, a false preposition can imply anything: Python
*always* reaches the .pth entries atleast once, in a typical
installation, while looking for sitecustomize. This will cause
a load of all zipfiles on sys.path, before site.py is done.
> Please check your facts before spreading untruths like this
I did check: I have a file a.pth in site-packages, which refers to
a.zip (in the same directory), and I have an empty Python file e.py.
strace -o xxx python e.py
shows, among others
open("/usr/lib/python2.3/site-packages/a.zip", O_RDONLY|O_LARGEFILE) = 5
132) = 132
So a.zip is read even though the program does not contain
a single import statement.
What is the untruth I'm spreading?
More information about the Distutils-SIG