Added python install script for Laki.
This commit is contained in:
parent
616cf19259
commit
b37dbca3c9
1 changed files with 110 additions and 0 deletions
110
python_install.sh
Executable file
110
python_install.sh
Executable file
|
@ -0,0 +1,110 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Installation script for python and stuff
|
||||
# Christoph Niethammer <niethammer@hlrs.de> (C) 2011
|
||||
# Jose Gracia <gracia@hlrs.de> (c) 2011
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
source "functions.sh"
|
||||
|
||||
export ORIGDIR=`pwd`
|
||||
export SIT_DIR=$(dirname "$ORIGDIR/$0")
|
||||
#echo $SIT_DIR
|
||||
|
||||
export SRC_POOL=${HOME}/src
|
||||
export WORKDIR_BASE=${HOME}/work
|
||||
|
||||
PYTHON_VERSION=2.7.1
|
||||
SETUPTOOLS_VERSION=0.6c11
|
||||
CAIRO_VERSION=1.2.2
|
||||
PYGRAPHVIZ_VERSION=1.0
|
||||
NETWORKX_VERSION=1.4
|
||||
PYGTK_VERSION=2.10.6
|
||||
PYGOBJECT_VERSION=2.12.3
|
||||
|
||||
#export BASE_PREFIX=${HOME}/opt/python
|
||||
export BASE_PREFIX=/sw/laki/hlrs/python
|
||||
PREFIX=${BASE_PREFIX}/${PYTHON_VERSION}
|
||||
MAKEOPTS="-j4"
|
||||
|
||||
|
||||
|
||||
function sit_auto_install() {
|
||||
export WORKDIR=$WORKDIR_BASE/${P}
|
||||
export SRCDIR=${WORKDIR}/${P}
|
||||
export BUILDDIR=${WORKDIR}/build
|
||||
if [ -d ${WORKDIR} ]
|
||||
then
|
||||
rm -rf ${WORKDIR}
|
||||
fi
|
||||
mkdir -p ${WORKDIR}
|
||||
mkdir -p ${BUILDDIR}
|
||||
mkdir -p ${PREFIX}
|
||||
cd ${WORKDIR}
|
||||
sit_unpack
|
||||
sit_configure
|
||||
sit_build
|
||||
sit_install
|
||||
}
|
||||
|
||||
|
||||
# install python interpreter
|
||||
P=Python-${PYTHON_VERSION}
|
||||
A=Python-${PYTHON_VERSION}.tar.bz2
|
||||
sit_auto_install
|
||||
|
||||
|
||||
# set python variables to installation
|
||||
export PATH=$PREFIX/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$PREFIX/lib
|
||||
echo "Python interpreter installed under"
|
||||
echo " $PREFIX"
|
||||
|
||||
# install setuptool
|
||||
chmod +x ${SRC_POOL}/setuptools-${SETUPTOOLS_VERSION}-py2.7.egg
|
||||
${SRC_POOL}/setuptools-${SETUPTOOLS_VERSION}-py2.7.egg
|
||||
|
||||
|
||||
# install additional packages under PREFIX
|
||||
# and use python setup.py install --prefix $PREFIX
|
||||
echo "Installing additional python modules/packages under"
|
||||
echo " ${PREFIX}"
|
||||
echo "Use '--prefix=${PREFIX}' with distutils."
|
||||
|
||||
|
||||
# install pycairo
|
||||
echo "Installing pycairo ${CAIRO_VERSION}"
|
||||
P=pycairo-${CAIRO_VERSION}
|
||||
A=${P}.tar.gz
|
||||
sit_auto_install
|
||||
|
||||
|
||||
# install pygraphviz
|
||||
echo "installing pygraphviz ${PYGRAPHVIZ_VERSION}"
|
||||
P=pygraphviz-${PYGRAPHVIZ_VERSION}
|
||||
A=${P}.tar.gz
|
||||
easy_install --allow-hosts None -f ${SRC_POOL} pygraphviz
|
||||
|
||||
|
||||
# install networkx
|
||||
echo "installing networkx ${NETWORKX_VERSION}"
|
||||
easy_install --allow-hosts None -f ${SRC_POOL} networkx
|
||||
|
||||
|
||||
|
||||
# install pygtk
|
||||
echo "Installing pygtk ${PYGTK_VERSION}"
|
||||
P=pygtk-${PYGTK_VERSION}
|
||||
A=${P}.tar.bz2
|
||||
sit_auto_install
|
||||
|
||||
# install pygobject
|
||||
echo "Installing pygobject ${PYGOBJECT_VERSION}"
|
||||
P=pygobject-${PYGOBJECT_VERSION}
|
||||
A=${P}.tar.gz
|
||||
sit_auto_install
|
||||
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue