[buildout]

extends =
  ../../component/git/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/libxml2/buildout.cfg
  ../../component/libxslt/buildout.cfg
  ../../component/bcrypt/buildout.cfg
  ../../component/zlib/buildout.cfg
  ../../component/phantomjs/buildout.cfg
  ../../component/pycurl/buildout.cfg
  ../../component/coreutils/buildout.cfg
  ../../component/socat/buildout.cfg
  ../../component/lmsensors/buildout.cfg
  ../../component/rsync/buildout.cfg
  ../../component/jq/buildout.cfg
  ../../component/sed/buildout.cfg
  ../../component/grep/buildout.cfg
  ../../component/userhosts/buildout.cfg
  ../../component/postgresql/buildout.cfg
  ../../component/psycopg2/buildout.cfg
  ../../stack/slapos.cfg
  ../../stack/caucase/buildout.cfg
  ../../stack/nxdtest.cfg
  ./buildout.hash.cfg

parts =
  bootstrap-slapos.recipe.cmmi
  eggs/scripts
  phantomjs
  template

[python]
part = python2.7

[bootstrap-slapos.recipe.cmmi]
# install our develop version of slapos.recipe.cmmi before anything else,
# otherwise it will be installed from pypi by dependencies.
recipe = zc.recipe.egg
eggs = ${slapos.recipe.cmmi-setup:egg}

[setup-develop-egg]
recipe = zc.recipe.egg:develop

[caucase-setup]
<= setup-develop-egg
egg = caucase
setup = ${caucase-repository:location}

[kedifa-setup]
<= setup-develop-egg
egg = kedifa
setup = ${kedifa-repository:location}
depends = ${caucase-setup:egg}

[slapos.libnetworkcache-setup]
<= setup-develop-egg
egg = slapos.libnetworkcache
setup = ${slapos.libnetworkcache-repository:location}

[slapcache-setup]
<= setup-develop-egg
egg = slapcache
setup = ${slapcache-repository:location}

[erp5.util-setup]
<= setup-develop-egg
# XXX erp5.util does not have `test` extra require, but has a `testnode` extra require with same dependencies
egg = erp5.util[testnode]
setup = ${erp5.util-repository:location}
depends = ${slapos.core-setup:egg}

[slapos.cookbook-setup]
<= setup-develop-egg
egg = slapos.cookbook[test]
setup = ${slapos.cookbook-repository:location}
depends =
  ${slapos.core-setup:egg}
  ${psycopg2:egg}
  ${slapos-cookbook-dependencies:eggs}

[slapos.core-setup]
<= setup-develop-egg
egg = slapos.core[test]
setup = ${slapos.core-repository:location}

[slapos.recipe.build-setup]
<= setup-develop-egg
egg = slapos.recipe.build[test]
setup = ${slapos.recipe.build-repository:location}

[slapos.recipe.cmmi-setup]
<= setup-develop-egg
egg = slapos.recipe.cmmi[test]
setup = ${slapos.recipe.cmmi-repository:location}
depends = ${slapos.recipe.build-setup:egg}

[slapos.recipe.template-setup]
<= setup-develop-egg
# XXX slapos.recipe.template does not have `test` extra require, `zope.testing` is only listed in `tests_require` and is listed explicitly
egg = slapos.recipe.template
setup = ${slapos.recipe.template-repository:location}

[slapos.toolbox-setup]
<= setup-develop-egg
egg = slapos.toolbox[test]
setup = ${slapos.toolbox-repository:location}
depends =
  ${slapos.core-setup:egg}
  ${slapos-toolbox-dependencies:eggs}

[slapos.rebootstrap-setup]
<= setup-develop-egg
egg = slapos.rebootstrap[test]
setup = ${slapos.rebootstrap-repository:location}

[rubygemsrecipe-setup]
<= setup-develop-egg
egg = rubygemsrecipe[test]
setup = ${rubygemsrecipe-repository:location}

[eggs]
<= python-interpreter
eggs +=
  ${lxml-python:egg}
  ${python-PyYAML:egg}
  ${python-cryptography:egg}
  ${backports.lzma:egg}
  ${pycurl:egg}
  ${bcrypt:egg}
  dnspython
  Jinja2
  ${kedifa-setup:egg}
  ${caucase-setup:egg}
  ${erp5.util-setup:egg}
  ${slapos.cookbook-setup:egg}
  ${slapos.core-setup:egg}
  ${slapos.recipe.build-setup:egg}
  ${slapos.recipe.cmmi-setup:egg}
  ${slapos.recipe.template-setup:egg}
  ${slapos.toolbox-setup:egg}
  ${slapos.libnetworkcache-setup:egg}
  ${slapcache-setup:egg}
  ${slapos.rebootstrap-setup:egg}
  ${rubygemsrecipe-setup:egg}
  zope.testing
  supervisor

[eggs/scripts]
recipe = zc.recipe.egg
eggs = ${eggs:eggs}
scripts =
  slapos
  supervisord

[git-clone-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
branch = master

[kedifa-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/kedifa.git

[caucase-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/caucase.git

[erp5.util-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/erp5.git

[slapos.cookbook-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.git

[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git

[slapos.recipe.template-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.template.git

[slapos.libnetworkcache-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.libnetworkcache.git

[slapcache-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapcache.git

[slapos.recipe.build-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.build.git
# We use the system git and not slapos provided one, because
# slapos.recipe.build is a dependency of slapos.recipe.cmmi
#git-executable = git

[slapos.recipe.cmmi-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.recipe.cmmi.git
# We use the system git and not slapos provided one, because slapos git needs
# slapos.recipe.cmmi to be installed. This circular dependency cause parts to
# be reinstalled everytime buildout is run because signatures are not stable.
#git-executable = git

[slapos.toolbox-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git

[slapos.rebootstrap-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.rebootstrap.git

[rubygemsrecipe-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git

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

[versions]
# When possible, clear version pins of tested eggs, to make sure buildout
# always use the git checkout version.
# This is not possible for buildout extensions, or for buildout recipes
# that are also used in this profile, so we keep version pins for these.
# We need to keep the versions in the profiles (in stack/slapos.cfg, or
# maybe here during development) in sync with the latest version from their
# setup.py , because if the version in setup.py is newer from the version
# pin, buildout will install the egg from pypi and run the test against
# released egg
caucase =
erp5.util =
kedifa =
slapos.cookbook =
slapos.core =
# slapos.libnetworkcache =
# slapos.rebootstrap =
# slapos.recipe.build =
# slapos.recipe.cmmi =
# slapos.recipe.template =
slapos.toolbox =
rubygemsrecipe =

# All other depencies should be pinned.
Pygments = 2.1.3
zc.lockfile = 1.4
bcrypt = 3.1.4
dnspython = 1.15.0
funcsigs = 1.0.2
httmock = 1.2.6
manuel = 1.9.0
mock = 2.0.0:whl
testfixtures = 6.11.0
pycurl = 7.43.0.2
pyflakes = 2.0.0
zope.testing = 4.6.2
urllib3 = 1.24.1
pathlib = 1.0.1
psycopg2 = 2.8.6
iniparse = 0.5
