[Distutils] Question about finding downloads (with distutils.cfg)
Phillip J. Eby
pje at telecommunity.com
Sun Aug 24 21:32:19 CEST 2008
At 05:33 PM 8/22/2008 +0100, Fadhley Salim wrote:
>All of the five sources contain the exact same collection of files.
>Most users who can access the european web-servers cannot access the
>American UNC paths and vice-versa.
>That usually works out well, because the sources a user cannot access
>will quickly time-out and the user will get the egg they need from a
>source they can access.
>The problem comes with users who can access both the web-servers *and*
>the UNC paths easy_install. For example a mobile, "international" user
>might have access to everything but with a slow connection.
>Even if the egg needed can be found on any one of the hosts the
>remaining two (the UNC paths) will always be checked by setuptools. This
>makes setuptools run very slow indeed:
>I have found that easy_install is needlessly checking all five sources
>even if checking only one would be good enough.
>Is there a way to make setuptools stop searching as soon as it's found
>the first source which contains the required egg?
Yes and no. The issue here is that easy_install sees the UNC paths
as local, so it should actually check them *first*, and then skip the
URLs if the requirements can be met. However, once easy_install has
checked even one URL, it will check any subsequent URLs immediately.
So, in theory, you could make it check the UNC paths first and not
the URLs, but you might find it difficult to lock down in
practice. Plus, it doesn't actually fix your problem, if I
understand it correctly.
More information about the Distutils-SIG