Commit b645dc1d authored by Julien Muchembled's avatar Julien Muchembled

Work around circular imports inside slapos.buildout

parent a2172850
...@@ -31,7 +31,6 @@ import tarfile ...@@ -31,7 +31,6 @@ import tarfile
import tempfile import tempfile
from hashlib import md5 from hashlib import md5
from setuptools import archive_util from setuptools import archive_util
from zc.buildout import download
from . import is_true, EnvironMixin, Shared from . import is_true, EnvironMixin, Shared
from . import make_read_only_recursively # for slapos.recipe.cmmi from . import make_read_only_recursively # for slapos.recipe.cmmi
...@@ -60,6 +59,9 @@ class Recipe(EnvironMixin): ...@@ -60,6 +59,9 @@ class Recipe(EnvironMixin):
return self._shared.install(self._install) return self._shared.install(self._install)
def _install(self): def _install(self):
# WKRD: do not import at module-level because of circular imports
# inside slapos.buildout (see networkcache support)
from zc.buildout import download
location = self._shared.location location = self._shared.location
alternate = self.options.get('alternate-url') alternate = self.options.get('alternate-url')
path, is_temp = download.Download(self.buildout['buildout'], path, is_temp = download.Download(self.buildout['buildout'],
......
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