[Distutils] Disabling --single-version-externally-managed

Phillip J. Eby pje at telecommunity.com
Mon Sep 3 17:52:34 CEST 2007

At 09:34 PM 9/2/2007 -0700, Toshio Kuratomi wrote:
>Hash: SHA1
>Phillip J. Eby wrote:
> > At 12:49 AM 9/2/2007 -0700, Toshio Kuratomi wrote:
> >>
> >> Let me know what else you need.
> >
> > What are the current contents of easy-install.pth?
> >
> >
>import sys; sys.__plen = len(sys.path)
>import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
>p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
>Do you want me to get rid of it and try again?

No.  I believe I've found the problem now; it's that .egg-info eggs 
don't need to be inserted ahead of their containing directory.  Try 
this patch; if it works for you, I'll put it out in an 0.6c7 release 
later today or tomorrow:

Index: pkg_resources.py
--- pkg_resources.py    (revision 55711)
+++ pkg_resources.py    (working copy)
@@ -2148,7 +2148,8 @@
          for p, item in enumerate(npath):
              if item==nloc:
-            elif item==bdir:
+            elif item==bdir and self.precedence==EGG_DIST:
+                # if it's an .egg, give it precedence over its directory
                  path.insert(p, loc)
                  npath.insert(p, nloc)

More information about the Distutils-SIG mailing list