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:
......@@ -1444,9 +1450,9 @@ def _default_globals():
These default expressions are convenience defaults available when eveluating
section headers expressions.
NB: this is wrapped in a function so that the computing of these expressions
is lazy and done only if needed (ie if there is at least one section with
an expression) because the computing of some of these expressions can be
expensive.
is lazy and done only if needed (ie if there is at least one section with
an expression) because the computing of some of these expressions can be
expensive.
"""
# partially derived or inspired from its.py
# Copyright (c) 2012, Kenneth Reitz All rights reserved.
......
......@@ -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