Commit 52c2bda4 authored by Jim Fulton's avatar Jim Fulton

Fixed:

https://launchpad.net/products/zc.buildout/+bug/60582

Don't use extensions when bootstrapping.
parent ee8054a7
...@@ -138,7 +138,6 @@ class Buildout(dict): ...@@ -138,7 +138,6 @@ class Buildout(dict):
options['installed']) options['installed'])
self._setup_logging() self._setup_logging()
self._load_extensions()
def _dosubs(self, section, option, value, data, converted, seen): def _dosubs(self, section, option, value, data, converted, seen):
key = section, option key = section, option
...@@ -241,6 +240,7 @@ class Buildout(dict): ...@@ -241,6 +240,7 @@ class Buildout(dict):
self['buildout']['bin-directory']) self['buildout']['bin-directory'])
def install(self, install_parts): def install(self, install_parts):
self._load_extensions()
self._setup_directories() self._setup_directories()
# Add develop-eggs directory to path so that it gets searched # Add develop-eggs directory to path so that it gets searched
...@@ -607,6 +607,10 @@ class Buildout(dict): ...@@ -607,6 +607,10 @@ class Buildout(dict):
dest = None dest = None
else: else:
dest = self['buildout']['eggs-directory'] dest = self['buildout']['eggs-directory']
if not os.path.exists(dest):
self._logger.info('Creating directory %s', dest)
os.mkdir(dest)
zc.buildout.easy_install.install( zc.buildout.easy_install.install(
specs, dest, specs, dest,
path=[self['buildout']['develop-eggs-directory']], path=[self['buildout']['develop-eggs-directory']],
......
...@@ -356,10 +356,29 @@ Commmonds: ...@@ -356,10 +356,29 @@ Commmonds:
<BLANKLINE> <BLANKLINE>
""" """
def linkerSetUp(test): def test_bootstrap_with_extension():
zc.buildout.testing.buildoutSetUp(test, clear_home=False) """
zc.buildout.testing.multi_python(test) We had a problem running a bootstrap with an extension. Let's make
zc.buildout.testing.setUpServer(test, zc.buildout.testing.make_tree(test)) sure it is fixed. Basically, we don't load extensions when
bootstrapping.
>>> d = mkdtemp('sample-bootstrap-2')
>>> write(d, 'buildout.cfg',
... '''
... [buildout]
... extensions = some_awsome_extension
... parts =
... ''')
>>> os.chdir(d)
>>> print system(os.path.join(sample_buildout, 'bin', 'buildout')
... + ' bootstrap'),
buildout: Creating directory /sample-bootstrap-2/bin
buildout: Creating directory /sample-bootstrap-2/parts
buildout: Creating directory /sample-bootstrap-2/eggs
buildout: Creating directory /sample-bootstrap-2/develop-eggs
"""
def easy_install_SetUp(test): def easy_install_SetUp(test):
zc.buildout.testing.buildoutSetUp(test) zc.buildout.testing.buildoutSetUp(test)
...@@ -562,6 +581,7 @@ def test_suite(): ...@@ -562,6 +581,7 @@ def test_suite():
'zc.buildout.egg'), 'zc.buildout.egg'),
(re.compile('(\n?)- ([a-zA-Z_.-]+)-script.py\n- \\2.exe\n'), (re.compile('(\n?)- ([a-zA-Z_.-]+)-script.py\n- \\2.exe\n'),
'\\1- \\2\n'), '\\1- \\2\n'),
(re.compile('\S+sample-(\w+)'), r'/sample-\1'),
]), ]),
) )
)) ))
......
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