[buildout]
versions = versions
extends =
  ../../component/wendelin.core/buildout.cfg
  ../../component/msgpack-python/buildout.cfg
  ../../component/scipy/buildout.cfg
  ../../software/erp5/software.cfg
parts +=
  wendelin
  scipy
  msgpack-python
  ipython
  wendelin.core
  jupyter
  jupyter-notebook-initialized-scripts
  wendelin_test_suite_runner
  wendelin_testrunner

[eggs]
initialization =
  import scipy.spatial.ckdtree # load our own libstdc++ explicitly at the very beginning
extra-paths +=
  ${wendelin:location}
eggs +=
  astor
  ${scipy:egg}
  ${msgpack-python:egg}
  ${wendelin.core:egg}
  ${ipython:egg}
  
[generic_testrunner_init]
initialization = 
  # The 4 lines below will replace the process with another one, with the proper
  # LD_PRELOAD environment variable. This is necessary because LD_PRELOAD is only
  # taken into account when the process starts. Modifying it in runtime doesn't
  # work.
  import struct, os
  arch = 8 * struct.calcsize("P")
  rerun = not os.getenv('LD_PRELOAD')
  if rerun: os.environ['LD_PRELOAD'] = '''${gcc:location}/lib%s/libstdc++.so''' % arch
  if rerun: os.execve(os.path.realpath(__file__), sys.argv, os.environ)
  
[wendelin_test_suite_runner]
<= test_suite_runner
# we need to override the test suite runner to add our custom libstdc++ dynamic
# library to the path
initialization =
  ${generic_testrunner_init:initialization}
  ${test_suite_runner:initialization}
  
[wendelin_testrunner]
<= testrunner
# we need to override the test suite runner to add our custom libstdc++ dynamic
# library to the path
initialization =
  ${generic_testrunner_init:initialization}
  ${testrunner:initialization}
 
[erp5_repository_list]
repository_id_list += wendelin

[local-bt5-repository]
list += ${wendelin:location}/bt5

# Jupyter is by default enabled in Wendelin
[erp5-defaults]
jupyter-enable-default = true

[wendelin]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/wendelin.git
branch = master

[versions]
msgpack-python = 0.4.8
wendelin.core = 0.11
