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

Support correctly networkcache in outer methods.

parent 73b544e5
......@@ -1120,6 +1120,21 @@ def _install_and_load(spec, group, entry, buildout):
dest = buildout_options['eggs-directory']
path = [buildout_options['develop-eggs-directory']]
networkcache_kw = {}
if LIBNETWORKCACHE_ENABLED:
# support networkcache
networkcache_section_name = buildout_options.get('networkcache-section')
if networkcache_section_name:
networkcache_section = buildout[networkcache_section_name]
networkcache_kw['download_cache_url'] = networkcache_section[
'download-cache-url']
networkcache_kw['download_dir_url'] = networkcache_section[
'download-dir-url']
networkcache_kw['upload_cache_url'] = networkcache_section.get(
'upload-cache-url')
networkcache_kw['upload_dir_url'] = networkcache_section.get(
'upload-dir-url')
zc.buildout.easy_install.install(
[spec], dest,
links=buildout._links,
......@@ -1129,8 +1144,7 @@ def _install_and_load(spec, group, entry, buildout):
newest=buildout.newest,
allow_hosts=buildout._allow_hosts,
prefer_final=not buildout.accept_buildout_test_releases,
download_cache_url=self.download_cache_url,
download_dir_url=self.download_dir_url)
**networkcache_kw)
__doing__ = 'Loading %s recipe entry %s:%s.', group, spec, entry
return pkg_resources.load_entry_point(
......
......@@ -1098,7 +1098,8 @@ def install(specs, dest,
path=None, working_set=None, newest=True, versions=None,
use_dependency_links=None, allow_hosts=('*',),
include_site_packages=None, allowed_eggs_from_site_packages=None,
prefer_final=None, download_dir_url=None, download_cache_url=None):
prefer_final=None, download_dir_url=None, download_cache_url=None,
upload_dir_url=None, upload_cache_url=None):
installer = Installer(
dest, links, index, executable, always_unzip, path, newest,
versions, use_dependency_links, allow_hosts=allow_hosts,
......
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