#!/bin/bash -l UDBUILD_HOME=$WORKDIR/sw PKGNAME=netcdf # Change this to the version of netcdf VERSION=1.1.7.1 # Change this to the version of python PY_VERS=2.7.8 # Load the udbuild package vpkg_devrequire udbuild # These are all the dependencies for netcdf specifying the # particular python version based on PY_VERS environment variable vpkg_devrequire python/$PY_VERS vpkg_devrequire python-numpy/python$PY_VERS vpkg_devrequire netcdf/4.3 # This initializes the environment for the build based on the # package name and version, and we use the install option # for a python add-on (python-addon) init_udbuildenv python-addon # These are environment variables needed for the install - hints for # what might be needed can be found in the setup.cfg.template file export HDF5_DIR=${HDF5_PREFIX} export NETCDF4_DIR=${NETCDF_PREFIX} export HDF4_DIR=${HDF4_PREFIX} # Standard install is 'python setup.py build' but we use $PYTHON to get # the correct version of python we are building the add-on for as defined # above rather than a default system version $PYTHON setup.py build $PYTHON setup.py install --prefix=$PREFIX