[buildout]
extends =
  ../cython/buildout.cfg
  ../numpy/openblas.cfg
  ../scipy/buildout.cfg

parts =
  scikit-learn

[scikit-learn-env]
<= numpy-env

[scikit-learn]
recipe = zc.recipe.egg:custom
egg = scikit-learn
environment = scikit-learn-env
setup-eggs =
  ${numpy:egg}
  ${scipy:egg}
rpath =
  ${gcc:location}/lib
  ${gcc:location}/lib64
  ${openblas:location}/lib

[scikit-learn-repository]
recipe  = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://github.com/scikit-learn/scikit-learn.git
location = ${buildout:parts-directory}/scikit-learn

[scikit-learn-develop]
# This only work if we use zc.recipe.egg from zc.buildout 2 patched
# by nexedi (zc.recipe.egg = 2.0.3+slapos001 and zc.buildout = 2.5.2+slapos003)
recipe = zc.recipe.egg:develop
egg = scikit-learn
setup = ${scikit-learn-repository:location}
environment = scikit-learn-env
setup-eggs =
  ${cython:egg}
  ${numpy:egg}
  ${scipy:egg}
rpath =
  ${gcc-fortran:location}/lib
  ${gcc-fortran:location}/lib64
  ${openblas:location}/lib