Commit 449f1618 authored by Xavier Thompson's avatar Xavier Thompson

Add bootstrap --all-local mode

With this mode zc.buildout and its dependencies are installed
from scratch directly in the local eggs directory, following
the pinned versions if any apply.

In offline mode this merely ensures that the required eggs are
already installed in the local eggs and develop-eggs directory.
parent cd17d269
......@@ -615,6 +615,24 @@ class Buildout(DictMixin):
self._setup_directories()
if '--all-local' in args:
# Now install buildout and dependent eggs, and record destination eggs:
dest = self['buildout']['eggs-directory']
path = [self['buildout']['develop-eggs-directory']]
if self.offline:
# Cannot install: just check requirements are already met
path.append(dest)
dest = None
ws = zc.buildout.easy_install.install(
['zc.buildout'],
dest,
links=self._links,
index=self['buildout'].get('index'),
path=path,
newest=self.newest,
allow_hosts=self._allow_hosts,
)
else:
# Now copy buildout and setuptools eggs, and record destination eggs:
entries = []
for dist in zc.buildout.easy_install.buildout_and_setuptools_dists:
......@@ -633,10 +651,12 @@ class Buildout(DictMixin):
shutil.copytree(dist.location, dest)
else:
shutil.copy2(dist.location, dest)
# Create buildout script
ws = pkg_resources.WorkingSet(entries)
# Ensure all the requirements are met
ws.require('zc.buildout')
# Create buildout script
options = self['buildout']
eggs_dir = options['eggs-directory']
develop_eggs_dir = options['develop-eggs-directory']
......
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