# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # [buildout] extends = etc/dependencies.cfg unzip = true #develop = ./src/main/python/rcmes parts = zlib curl szip jpeg libpng freetype numpy numpy-build scipy scipy-build matplotlib matplotlib-build hdf5 netcdf netcdf4 netcdf4-build ncl-bin pynio-bin pyngl-bin bottle requests [zlib] recipe = hexagonit.recipe.cmmi url = ${external:zlibURL} md5sum = ${external:zlibMD5} configure-options = --prefix=/usr/local --shared make-target = all install [curl] recipe = hexagonit.recipe.cmmi url = ${external:curlURL} md5sum = ${external:curlMD5} configure-options = --bindir=${buildout:bin-directory} --with-zlib=${zlib:location} [libpng] recipe = hexagonit.recipe.cmmi url = ${external:libpngURL} md5sum = ${external:libpngMD5} configure-options = --prefix=/usr/local --with-pic make-target = all install [freetype] recipe = hexagonit.recipe.cmmi url = ${external:freetypeURL} md5sum = ${external:freetypeMD5} configure-options = --prefix=/usr/local [jpeg] recipe = hexagonit.recipe.cmmi url = ${external:jpegURL} md5sum = ${external:jpegMD5} configure-options = --prefix=/usr/local make-target = all install install-lib install-headers [szip] recipe = hexagonit.recipe.cmmi url = ${external:szipURL} md5sum = ${external:szipMD5} [hdf5] recipe = hexagonit.recipe.cmmi url = ${external:hdf5URL} md5sum = ${external:hdf5MD5} environment = CPPFLAGS=-D__BSD_VISIBLE configure-options = --bindir=${buildout:bin-directory} --enable-production --enable-threadsafe --enable-hl --enable-shared --with-pthread --with-szlib=${szip:location} --with-zlib=${zlib:location} [netcdf] recipe = hexagonit.recipe.cmmi url = ${external:netcdfURL} md5sum = ${external:netcdfMD5} environment = CPPFLAGS=-I${szip:location}/include -I${hdf5:location}/include -I${zlib:location}/include -I${curl:location}/include LDFLAGS=-L${szip:location}/lib -L${hdf5:location}/lib -L${zlib:location}/lib -L${curl:location}/lib configure-options = --bindir=${buildout:bin-directory} --enable-dap --enable-cxx-4 --enable-ncgen4 --enable-shared --enable-netcdf-4 [netcdf4] recipe = hexagonit.recipe.download url = ${external:netCDF4-pythonURL} md5sum = ${external:netCDF4-pythonMD5} [netcdf4-build] recipe = cp.recipe.cmd shell = /bin/bash install_cmd = export HDF5_DIR=${hdf5:location} export NETCDF4_DIR=${netcdf:location} export SZIP_DIR=${szip:location} cd ${netcdf4:location}/netCDF4-1.0.2 python setup.py build python setup.py install [numpy] recipe = hexagonit.recipe.download url = ${external:numpyURL} md5sum = ${external:numpyMD5} [numpy-build] recipe = collective.recipe.cmd on_install = true on_update = true cmds = cd ${numpy:location} ${buildout:directory}/bin/buildout setup numpy-1.6.2 install [scipy] recipe = hexagonit.recipe.download url = ${external:scipyURL} md5sum = ${external:scipyMD5} [scipy-build] recipe = collective.recipe.cmd on_install = true on_update = true cmds = cd ${scipy:location} ${buildout:directory}/bin/buildout setup scipy-0.11.0 install [matplotlib] recipe = hexagonit.recipe.download url = ${external:matplotlibURL} md5sum = ${external:matplotlibMD5} [matplotlib-build] recipe = collective.recipe.cmd on_install = true on_update = true cmds = cd ${matplotlib:location}/matplotlib python setup.py build python setup.py install [ncl-bin] recipe = cp.recipe.cmd shell = /bin/bash install_cmd = OS=`uname -s` VER=`uname -m` cd ${buildout:directory}/parts mkdir -p ~/NCL if [ "$OS" == "Darwin" ] then if [ "$VER" == "x86_64" ] then ${buildout:bin-directory}/curl ${external:nclBinURL_OSX64} -o "ncl.tar.gz" else ${buildout:bin-directory}/curl ${external:nclBinURL_OSX32} -o "ncl.tar.gz" fi elif [ "$OS" == "Linux" ] then if [ "$VER" == "x86_64" ] then ${buildout:bin-directory}/curl ${external:nclBinURL_Linux64} -o "ncl.tar.gz" else ${buildout:bin-directory}/curl ${external:nclBinURL_Linux32} -o "ncl.tar.gz" fi else echo "Unable to properly detect your OS. Please report this problem." echo "Cancelling installation of NCL..." exit fi if [ ! -e ${buildout:directory}/parts/ncl.tar.gz ] then echo "Unable to download NCL. Cancelling installation..." exit 2 fi cd ~/NCL tar xzf ${buildout:directory}/parts/ncl.tar.gz if [ -e ~/.cshrc ] then echo "setenv NCARG_ROOT ~/NCL" >> ~/.cshrc echo "setenv PATH \$NCARG_ROOT/bin:\$PATH" >> ~/.cshrc fi if [ -e ~/.bashrc ] then echo "export NCARG_ROOT=~/NCL" >> ~/.bashrc echo "export PATH=\$NCARG_ROOT/bin:\$PATH" >> ~/.bashrc fi update_cmd = ${ncl-bin:install_cmd} [pynio] recipe = hexagonit.recipe.download url = ${external:pynioURL} md5sum = ${external:pynioMD5} [pynio-build] recipe = collective.recipe.cmd on_install = true on_update = true cmds = cd ${pynio:location}/PyNIO-1.4.1 export NCARG_ROOT=${ncl:location}/ncl_ncarg-6.0.0-patched export HAS_GRIB2=1 export HAS_OPENDAP=0 export NETCDF_PREFIX=${netcdf:location} export GRIB2_PREFIX=/usr/local export F2CLIBS=gfortran export F2CLIBS_PREFIX=/usr/local/Cellar/gfortran/4.7.2/gfortran/lib python setup.py install [pynio-bin] recipe = cp.recipe.cmd shell = /bin/bash install_cmd = OS=`uname -s` VER=`uname -m` mkdir -p ~/Downloads/PyNIO cd ~/Downloads/PyNIO if [ "$OS" == "Darwin" ] then if [ "$VER" == "x86_64" -o "$VER" == "i386" ] then ${buildout:bin-directory}/curl ${external:pynioBinURL_OSX64} -o "PyNIO.tar.gz" else ${buildout:bin-directory}/curl ${external:pynioBinURL_OSX32} -o "PyNIO.tar.gz" fi elif [ "$OS" == "Linux" ] then if [ "$VER" == "x86_64" ] then ${buildout:bin-directory}/curl ${external:pynioBinURL_Linux64} -o "PyNIO.tar.gz" else ${buildout:bin-directory}/curl ${external:pynioBinURL_Linux32} -o "PyNIO.tar.gz" fi else echo "Unable to properly detect your OS. Please report this problem." echo "Cancelling installation of PyNIO..." exit fi if [ ! -e ~/Downloads/PyNIO/PyNIO.tar.gz ] then echo "Unable to download PyNIO. Cancelling installation..." exit 2 fi libDir=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` if [ ! -z "$VIRTUAL_ENV" ] then libDir="$VIRTUAL_ENV/lib/python2.7/site-packages" fi tar xzf PyNIO.tar.gz \cp -rf lib/python2.7/site-packages/* $libDir update_cmd = ${pynio-bin:install_cmd} # Why package your code properly? Who knows!!! So now we get to have this gem here... [pyngl-bin] recipe = cp.recipe.cmd shell = /bin/bash install_cmd = OS=`uname -s` VER=`uname -m` mkdir -p ~/Downloads/PyNGL cd ~/Downloads/PyNGL if [ "$OS" == "Darwin" ] then if [ "$VER" == "x86_64" -o "$VER" == "i386" ] then ${buildout:bin-directory}/curl ${external:pynglBinURL_OSX64} -o "PyNGL.tar.gz" else ${buildout:bin-directory}/curl ${external:pynglBinURL_OSX32} -o "PyNGL.tar.gz" fi elif [ "$OS" == "Linux" ] then if [ "$VER" == "x86_64" ] then ${buildout:bin-directory}/curl ${external:pynglBinURL_Linux64} -o "PyNGL.tar.gz" else ${buildout:bin-directory}/curl ${external:pynglBinURL_Linux32} -o "PyNGL.tar.gz" fi else echo "Unable to properly detect your OS. Please report this problem." echo "Cancelling installation of PyNGL..." exit fi if [ ! -e ~/Downloads/PyNGL/PyNGL.tar.gz ] then echo "Unable to download PyNGL. Cancelling installation..." exit 2 fi libDir=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` if [ ! -z "$VIRTUAL_ENV" ] then libDir="$VIRTUAL_ENV/lib/python2.7/site-packages" fi tar xzf PyNGL.tar.gz \cp -rf bin/* ${buildout:bin-directory} \cp -rf lib/python2.7/site-packages/* $libDir update_cmd = ${pyngl-bin:install_cmd} # This is a bit hacked around because buildout wouldn't cooperate and install the egg [bottle] recipe = collective.recipe.cmd on_install = true on_update = true cmds = pip install bottle # Simple pip installation of Requests [requests] recipe = collective.recipe.cmd on_install = true on_update = true cmds = pip install requests