Commit 71633373 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify and fix eggs support.

parent 580c41b9
......@@ -59,10 +59,10 @@ class Rebootstrap:
# support additional eggs
self.eggs = []
wanted_eggs = rebootstrap_section.get('eggs')
if wanted_eggs:
wanted_eggs = [q.strip() for q in wanted_eggs.split() if q.strip()]
self.eggs = wanted_eggs
eggs = rebootstrap_section.get('eggs')
if eggs:
eggs = [q.strip() for q in eggs.split() if q.strip()]
self.eggs = eggs
def __call__(self):
self.install_section()
......@@ -84,18 +84,18 @@ Buildout will be restarted automatically to have this change applied.
running_python=self.running_python)
self.logger.info(message)
options = self.buildout['buildout']
self.wanted_eggs = ['zc.buildout']
self.eggs.append('zc.buildout')
# XXX: A lot of below code is took from zc.buildout.buildout.py:_maybe_upgrade
# which is code duplication issue, but even if newer buildout with needed
# hooks will be released, this extension shall work on older ones
if zc.buildout.easy_install.is_distribute:
self.wanted_eggs.append('distribute')
self.eggs.append('distribute')
else:
self.wanted_eggs.append('setuptools')
self.eggs.append('setuptools')
ws = zc.buildout.easy_install.install(
[
(spec + ' ' + options.get(spec+'-version', '')).strip()
for spec in self.wanted_eggs
for spec in self.eggs
],
options['eggs-directory'],
links = options.get('find-links', '').split(),
......
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