Commit 55d76b34 authored by Reinout van Rees's avatar Reinout van Rees

Removing develop-eggs/ directory before bootstrapping.

There is code in buildout to remove develop-eggs that it knows about.
So if everything is OK, develop-egg removal works fine.
If there's something fishy goign on, however, buildout
doesn't clean it up enough. Zapping the entire directory upon bootstrap
is a very effective way to prevent problems.

Reason: the old osc.recipe.sysegg did add develop-eggs .egg-link files to the
site-packages dir, effectively short-circuiting buildout's picked versions.
Likewise an old bootstrap could have left a setuptoos.egg-link to an ancient
setuptools version. I just this minute had to help a colleague with just such
a problem.
parent 98eddb30
......@@ -391,6 +391,12 @@ class Buildout(DictMixin):
def bootstrap(self, args):
__doing__ = 'Bootstrapping.'
if os.path.exists(self['buildout']['develop-eggs-directory']):
if os.path.isdir(self['buildout']['develop-eggs-directory']):
rmtree(self['buildout']['develop-eggs-directory'])
self._logger.debug(
"Removed existing develop-eggs directory")
self._setup_directories()
# Now copy buildout and setuptools eggs, and record destination eggs:
......
......@@ -2860,6 +2860,7 @@ or paths to use:
>>> remove('setup.cfg')
>>> print_(system(buildout + ' -csetup.cfg init demo other ./src'), end='')
Creating '/sample-bootstrapped/setup.cfg'.
Creating directory '/sample-bootstrapped/develop-eggs'.
Getting distribution for 'zc.recipe.egg>=2.0.0a3'.
Got zc.recipe.egg
Installing py.
......@@ -2918,6 +2919,7 @@ for us:
>>> remove('setup.cfg')
>>> print_(system(buildout + ' -csetup.cfg init demo other ./src'), end='')
Creating '/sample-bootstrapped/setup.cfg'.
Creating directory '/sample-bootstrapped/develop-eggs'.
Installing py.
Generated script '/sample-bootstrapped/bin/demo'.
Generated script '/sample-bootstrapped/bin/distutilsscript'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment