Commit 00ad757b authored by Marco Mariani's avatar Marco Mariani

scikit: build with no virtualenv

parent cba81391
......@@ -5,6 +5,16 @@ extends =
../gcc/buildout.cfg
../libatlas/buildout.cfg
../libblas/buildout.cfg
../python-setuptools/buildout.cfg
[numpy-prerequired-eggs]
recipe = zc.recipe.egg
# These must be installed before building scipy and scikit-learn
eggs =
${lxml-python:egg}
cython
numpy
[scipy-repository.git]
......@@ -13,6 +23,7 @@ repository = https://github.com/scipy/scipy.git
branch = maintenance/0.13.x
git-executable = ${git:location}/bin/git
[scikit-learn-repository.git]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/scikit-learn/scikit-learn.git
......@@ -20,55 +31,58 @@ branch = 0.15.X
git-executable = ${git:location}/bin/git
[numpy-build-venv]
dependency = ${numpy-prerequired-egg:recipe}
[numpy-environment]
# need to find our gcc and cython
PATH=${gcc-fortran:location}/bin:${buildout:directory}/bin:$PATH
LD_PRELOAD=${gcc-fortran:location}/lib64/libgfortran.so.3 ${libblas:location}/libf77blas.so.3
ATLAS=${libatlas:location}/lib/libsatlas.so
BLAS=${libblas:location}/libfblas.a
LAPACK=${libatlas:location}/lib/liblapack.a
PYTHONPATH=${buildout:eggs-directory}/numpy-${versions:numpy}-py2.7-linux-x86_64.egg:${python-setuptools:pythonpath}
[sh-numpy-environment]
recipe = collective.recipe.template
input = inline:
export PATH="${numpy-environment:PATH}"
export LD_PRELOAD="${numpy-environment:LD_PRELOAD}"
export ATLAS="${numpy-environment:ATLAS}"
export BLAS="${numpy-environment:BLAS}"
export LAPACK="${numpy-environment:LAPACK}"
export PYTHONPATH="${numpy-environment:PYTHONPATH}"
output = ${buildout:directory}/numpy-environment.sh
mode = 755
[scikit-build]
dependency = ${numpy-prerequired-eggs:recipe} ${python-setuptools:recipe}
recipe = cp.recipe.cmd
location = ${buildout:parts-directory}/${:_buildout_section_name_}
egg-location = ${scikit-learn-repository.git:location}/dist
install_cmd =
if [ -d ${:location} ]; then
exit
fi
mkdir -p ${:location}
cd ${:location}
unset PYTHONPATH
# need to find our gcc, and cython
export PATH="${gcc-fortran:location}/bin:${buildout:directory}/bin:$PATH"
export LD_PRELOAD="${gcc-fortran:location}/lib64/libgfortran.so.3 ${libblas:location}/libf77blas.so.3"
export ATLAS=${libatlas:location}/lib/libsatlas.so
export BLAS=${libblas:location}/libfblas.a
export LAPACK=${libatlas:location}/lib/liblapack.a
export NUMPY_EGG=${buildout:eggs-directory}/numpy-${versions:numpy}-py2.7-linux-x86_64.egg
${buildout:directory}/bin/virtualenv ${:location}
. ${:location}/bin/activate
# we need to install numpy to satisfy the dependency...
# ${:location}/bin/pip install numpy
# ...but we can reuse the numpy egg that has been built by buildout.
${:location}/bin/easy_install $NUMPY_EGG
# look for numpy in buildout eggs, not in the virtualenv
export PYTHONPATH=$NUMPY_EGG
cd ${scipy-repository.git:location}
python setupegg.py bdist_egg
[ -d ${:egg-location} ] && exit
. ${sh-numpy-environment:output}
cd ${scikit-learn-repository.git:location}
python setup.py bdist_egg
${python2.7:location}/bin/python setup.py bdist_egg
update_cmd = ${:install_cmd}
[numpy-prerequired-egg]
recipe = zc.recipe.egg
# this must be installed before building scipy and scikit-learn
eggs =
${lxml-python:egg}
virtualenv
cython
numpy
[scipy-build]
dependency = ${numpy-prerequired-eggs:recipe} ${python-setuptools:recipe}
recipe = cp.recipe.cmd
egg-location = ${scipy-repository.git:location}/dist
install_cmd =
[ -d ${:egg-location} ] && exit
. ${sh-numpy-environment:output}
cd ${scipy-repository.git:location}
${python2.7:location}/bin/python setupegg.py bdist_egg
update_cmd = ${:install_cmd}
[numpy-dependent-eggs]
dependencies = ${numpy-build-venv:recipe}
recipe = zc.recipe.egg
find-links =
${scipy-repository.git:location}/dist
${scikit-learn-repository.git:location}/dist
${scipy-build:egg-location}
${scikit-build:egg-location}
eggs =
numpy
scipy
......@@ -77,8 +91,50 @@ eggs =
interpreter = python-numpy
#[numpy-build-venv]
## For more complex dependencies, it may be easier to build eggs
## within a virtual environment in this way.
## This section is provided as an example.
## If you use it, add virtualenv to [numpy-prerequired-eggs]
#dependency = ${numpy-prerequired-eggs:recipe}
#recipe = cp.recipe.cmd
#location = ${buildout:parts-directory}/${:_buildout_section_name_}
#install_cmd =
# if [ -d ${:location} ]; then
# exit
# fi
# mkdir -p ${:location}
# cd ${:location}
# unset PYTHONPATH
# # need to find our gcc, and cython
# export PATH="${gcc-fortran:location}/bin:${buildout:directory}/bin:$PATH"
# export LD_PRELOAD="${gcc-fortran:location}/lib64/libgfortran.so.3 ${libblas:location}/libf77blas.so.3"
# export ATLAS=${libatlas:location}/lib/libsatlas.so
# export BLAS=${libblas:location}/libfblas.a
# export LAPACK=${libatlas:location}/lib/liblapack.a
# export NUMPY_EGG=${buildout:eggs-directory}/numpy-${versions:numpy}-py2.7-linux-x86_64.egg
# ${buildout:directory}/bin/virtualenv ${:location}
# . ${:location}/bin/activate
# # we need to install numpy to satisfy the dependency...
# # ${:location}/bin/pip install numpy
# # ...but we can reuse the numpy egg that has been built by buildout.
# ${:location}/bin/easy_install $NUMPY_EGG
# # look for numpy in buildout eggs, not in the virtualenv
# export PYTHONPATH=$NUMPY_EGG
# cd ${scipy-repository.git:location}
# python setupegg.py bdist_egg
# cd ${scikit-learn-repository.git:location}
# python setup.py bdist_egg
#update_cmd = ${:install_cmd}
[versions]
Cython = 0.20.2
numpy = 1.8.1
scipy = 0.13.3
scikit-learn = 0.15.1
simpy = 3.0.5
......@@ -9,7 +9,9 @@ parts =
numpy-dependent-eggs
[versions]
Cython = 0.20.2
numpy = 1.8.1
scipy = 0.13.3
scikit-learn = 0.15.1
simpy = 3.0.5
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment