You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

36 lines
864 B

#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
##
## INSTALL Python 2.7.2
##
apt-get install wget bzip2 build-essential -y --force-yes
apt-get install libreadline-dev libbz2-dev libz-dev libssl-dev libsqlite3-dev libgdbm-dev libldap2-dev -y --force-yes
cd /tmp
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
tar xjf Python-2.7.2.tar.bz2
cd Python-2.7.2
./configure --prefix=/opt/apps/python-2.7.2
make
make install
##
## INSTALL DISTRIBUTE/PIP/VIRTUALENV
##
cd /tmp
wget http://python-distribute.org/distribute_setup.py
/opt/apps/python-2.7.2/bin/python ./distribute_setup.py
/opt/apps/python-2.7.2/bin/easy_install pip
/opt/apps/python-2.7.2/bin/pip install virtualenv
##
## MAKE A DEFAULT VIRTUAL ENV
##
cd /srv
mkdir -p /srv/virtualenv
/opt/apps/python-2.7.2/bin/virtualenv /srv/virtualenv/default --no-site-packages