Commit 29b4d70f authored by Xavier Thompson's avatar Xavier Thompson

[feat] Install libnetworkcache in bootstrap

If slapos.libnetworkcache is importable, install it in bootstrap
as though it were a dependency of zc.buildout.

This is a hack to propagate libnetworkcache as a soft dependency.
parent 0dcfd8c2
...@@ -615,6 +615,14 @@ class Buildout(DictMixin): ...@@ -615,6 +615,14 @@ class Buildout(DictMixin):
self._setup_directories() self._setup_directories()
# Hack: propagate libnetworkcache soft dependency
specs = ['zc.buildout']
try:
import slapos.libnetworkcache
specs.append('slapos.libnetworkcache')
except ImportError:
pass
# Install buildout and dependent eggs following pinned versions. # Install buildout and dependent eggs following pinned versions.
dest = self['buildout']['eggs-directory'] dest = self['buildout']['eggs-directory']
path = [self['buildout']['develop-eggs-directory']] path = [self['buildout']['develop-eggs-directory']]
...@@ -623,7 +631,7 @@ class Buildout(DictMixin): ...@@ -623,7 +631,7 @@ class Buildout(DictMixin):
path.append(dest) path.append(dest)
dest = None dest = None
ws = zc.buildout.easy_install.install( ws = zc.buildout.easy_install.install(
['zc.buildout'], specs,
dest, dest,
links=self._links, links=self._links,
index=self['buildout'].get('index'), index=self['buildout'].get('index'),
......
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