[Checkins] SVN: zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py Need to update cached envs whenever easy_install changes eggs on the
Ross Patterson
me at rpatterson.net
Sat Jan 21 11:44:21 UTC 2012
Log message for revision 124120:
Need to update cached envs whenever easy_install changes eggs on the
filesystem, including building.
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-21 10:16:57 UTC (rev 124119)
+++ zc.buildout/branches/env-cache/src/zc/buildout/easy_install.py 2012-01-21 11:44:19 UTC (rev 124120)
@@ -246,6 +246,14 @@
return env_copy
+def _update_envs(executable, dest=None):
+ python = _get_version(executable)
+ for key in _envs.keys():
+ cached_python, cached_path = key
+ if cached_python == python and dest in cached_path:
+ _envs[key].scan([dest])
+
+
def clear_index_cache():
_indexes.clear()
_envs.clear()
@@ -632,6 +640,7 @@
os.rename(d.location, newloc)
[d] = _get_env(self._executable, [newloc])[d.project_name]
result.append(d)
+ _update_envs(self._executable, self._dest)
return result
@@ -1192,11 +1201,7 @@
raise zc.buildout.UserError("Installing develop egg failed")
result = _copyeggs(tmp3, dest, '.egg-link', undo)
- python = _get_version(executable)
- for key in _envs.keys():
- cached_python, cached_path = key
- if cached_python == python and dest in cached_path:
- _envs[key].scan([dest])
+ _update_envs(executable, dest)
return result
finally:
More information about the checkins
mailing list