[Checkins] SVN: zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py Have to clear the whole dist cache when developing an egg.

Ross Patterson me at rpatterson.net
Sun Jan 29 05:23:07 UTC 2012


Log message for revision 124231:
  Have to clear the whole dist cache when developing an egg.
  
  This is unfortunate, but buildout depends on the environment not
  knowing about a develop egg after it's been installed in order to
  report "Getting distribution for '${dist}'" and "Got ${dist)
  ${version}".

Changed:
  U   zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py

-=-
Modified: zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py	2012-01-29 05:22:24 UTC (rev 124230)
+++ zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py	2012-01-29 05:23:07 UTC (rev 124231)
@@ -256,7 +256,12 @@
         if key in _dists:
             _dists[key].add(dist)
 
+def clear_dists(path_item):
+    for only in (True, False):
+        key = (path_item, only)
+        _dists.pop(key, None)
 
+
 clear_index_cache = _indexes.clear
 
 
@@ -1202,11 +1207,7 @@
             raise zc.buildout.UserError("Installing develop egg failed")
             
         result = _copyeggs(tmp3, dest, '.egg-link', undo)
-        # From pkg_resources.find_on_path egg-link support
-        for line in open(result):
-            if not line.strip(): continue
-            for dist in find_distributions(os.path.join(dest ,line.rstrip())):
-                update_dist(dest, dist)
+        clear_dists(dest)
         return result
 
     finally:



More information about the checkins mailing list