buildout.cfg 2.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
# SlapOS component for ZODB.
# https://zodb.org/

[buildout]
extends =
    ../git/buildout.cfg
    ../python-cffi/buildout.cfg

parts = ZODB/scripts


12
# ZODB allows to use either ZODB4, ZODB4-wc2 or ZODB5.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
# To select which version to use users should do:
#
#   [ZODB]
#   major = <ZODB-version-major>
#
# By default ZODB4 is used.
[ZODB]
recipe = slapos.recipe.build
major  = 4
init =
  # link/depend ZODB -> ZODB<X>
  zodb_x = 'ZODB'+options['major']
  zodb_x = self.buildout[zodb_x]
  options['depends'] = '$${%s:egg}' % zodb_x.name

  options['egg'] = zodb_x['egg']

  # update [versions] from what is needed by ZODB<X>
  self.buildout.parse('[_ZODB-versions]\n' + zodb_x['egg-versions'])
  versions = self.buildout['versions']
  versions.update(self.buildout['_ZODB-versions'])
  # propagate updated [versions] -> easy_install
  # (buildout does this in Buildout constructor)
  import zc.buildout.easy_install
  zc.buildout.easy_install.default_versions(versions)


# ZODB/scripts installs scripts from ZODB
[ZODB/scripts]
recipe  = zc.recipe.egg:scripts
eggs    = ${ZODB:egg}

# ZODB4 and ZODB5 are plain upstream eggs
[_ZODB]
recipe  = zc.recipe.egg:eggs
egg     = ZODB
eggs    = ${:egg}
depends = ${persistent:egg} ${BTrees:egg}

[ZODB4]
<= _ZODB
egg-versions =
  ZODB = 4.4.5
  transaction = 1.7.0

[ZODB5]
<= _ZODB
egg-versions =
  ZODB = 5.6.0
  transaction = 2.4.0


65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
# ZODB4-wc2 is ZODB4 version with patches for wendelin.core 2 to work correctly.
# The main change is backport of the way MVCC is handled by always calling
# loadBefore instead of load.
# See https://lab.nexedi.com/nexedi/ZODB/commit/8e7eab33 for details.
[ZODB4-wc2]
<= ZODB4
recipe = zc.recipe.egg:develop
setup = ${ZODB4-wc2-repository:location}

[ZODB4-wc2-repository]
recipe  = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/ZODB.git
git-executable = ${git:location}/bin/git
branch = 4-nxd+MVCC-load-before
revision = 4.4.5-9-g8e7eab330
location = ${buildout:parts-directory}/ZODB4-wc2


83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
# XXX: buildout fails to install properly eggs with setup_requires
[BTrees]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${persistent:egg}

[persistent]
recipe = zc.recipe.egg:custom
egg = ${:_buildout_section_name_}
setup-eggs = ${python-cffi:egg}


# eggs that are common to ZODB4 and ZODB5.
[versions]
BTrees = 4.5.1
persistent = 4.6.4
99
zodbpickle = 2.0.0
100 101 102 103 104

# Provide ZODB3 for those eggs that still care about ZODB3 compatibility -
# for example wendelin.core. ZODB3 3.11 is just a dependency egg on _latest_
# ZODB, persistent, BTrees and ZEO.
ZODB3 = 3.11.0