56 lines
1.1 KiB
Bash
56 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Ensure that we have the required access.
|
|
touch /awips2/python/lib/python2.7/site-packages
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
touch /awips2/python/bin
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
# this script will install the python setuptools site-package on a build machine. it will be used
|
|
# by pupynere and/or shapely
|
|
|
|
# contants
|
|
__SETUP_TOOLS=setuptools
|
|
__SETUP_TOOLS_TAR=setuptools-0.6c11.tar.gz
|
|
__SETUP_TOOLS_UNTARRED=setuptools-0.6c11
|
|
|
|
# arguments:
|
|
# 1) workspace
|
|
# 2) python packages directory
|
|
# 3) build root - temporary directory
|
|
|
|
WORKSPACE="${1}"
|
|
PYTHON_PACKAGES="${2}"
|
|
BUILD_ROOT="${3}"
|
|
|
|
cp -v ${PYTHON_PACKAGES}/${__SETUP_TOOLS}/${__SETUP_TOOLS_TAR} \
|
|
${BUILD_ROOT}
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
pushd . > /dev/null 2>&1
|
|
cd ${BUILD_ROOT}
|
|
tar -xvf ${__SETUP_TOOLS_TAR}
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
cd ${__SETUP_TOOLS_UNTARRED}
|
|
source /etc/profile.d/awips2.sh
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
/awips2/python/bin/python setup.py build
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
/awips2/python/bin/python setup.py install
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
popd > /dev/null 2>&1
|