[buildout]

find-links = http://www.nexedi.org/static/packages/source/slapos.buildout/
    http://dist.repoze.org
    http://www.nexedi.org/static/packages/source/

# Separate from site eggs
allowed-eggs-from-site-packages =
include-site-packages = false
exec-sitecustomize = false

versions = versions

extends =
  ../../stack/shacache-client.cfg
  ../../component/python-2.7/buildout.cfg
  ../../component/subversion/buildout.cfg
  ../../component/git/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/zip/buildout.cfg

parts =
  template
  eggs
  subversion
  zip
  git
  checkrecipe

# Separate from site eggs
allowed-eggs-from-site-packages =
include-site-packages = false
exec-sitecustomize = false

# Use only quite well working sites.
allow-hosts =
  *.nexedi.org
  *.python.org
  *.sourceforge.net
  dist.repoze.org
  effbot.org
  github.com
  peak.telecommunity.com
  psutil.googlecode.com
  www.dabeaz.com

develop =
  ${:parts-directory}/slapos.cookbook-repository
  ${:parts-directory}/erp5.util-repository

[checkrecipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link && grep parts ${buildout:develop-eggs-directory}/erp5.util.egg-link

[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone -b erp5testnode --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet

[erp5.util-repository]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --quiet http://git.erp5.org/repos/erp5.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet

[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-005

[eggs]
recipe = z3c.recipe.scripts
# Just so buildout executes [slapos.cookbook-repository] before [eggs], as
# - [eggs] references [slapos.cookbook-repository]
# - [instance-recipe] needs [slapos.cookbook-repository] to be finished
# - we cannot rely on anything else being executed before [eggs]
dummy =
  ${slapos.cookbook-repository:location}
  ${erp5.util-repository:location}
eggs =
  ${lxml-python:egg}
  zc.buildout
  slapos.libnetworkcache
  slapos.core
  slapos.cookbook
  erp5.util[testnode]

scripts =
  erp5testnode = erp5.util.testnode:main
  slapgrid-cp = slapos.grid.slapgrid:runComputerPartition
  slapgrid-sr = slapos.grid.slapgrid:runSoftwareRelease
  slapproxy = slapos.proxy:main

python = python2.7

[lxml-python]
python = python2.7

[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644