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

  1. #!/bin/bash
  2. set -eux # -x for verbose logging to juju debug-log
  3. ##
  4. ## INSTALL Python 2.7.2
  5. ##
  6. apt-get install wget bzip2 build-essential -y --force-yes
  7. apt-get install libreadline-dev libbz2-dev libz-dev libssl-dev libsqlite3-dev libgdbm-dev libldap2-dev -y --force-yes
  8. cd /tmp
  9. wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
  10. tar xjf Python-2.7.2.tar.bz2
  11. cd Python-2.7.2
  12. ./configure --prefix=/opt/apps/python-2.7.2
  13. make
  14. make install
  15. ##
  16. ## INSTALL DISTRIBUTE/PIP/VIRTUALENV
  17. ##
  18. cd /tmp
  19. wget http://python-distribute.org/distribute_setup.py
  20. /opt/apps/python-2.7.2/bin/python ./distribute_setup.py
  21. /opt/apps/python-2.7.2/bin/easy_install pip
  22. /opt/apps/python-2.7.2/bin/pip install virtualenv
  23. ##
  24. ## MAKE A DEFAULT VIRTUAL ENV
  25. ##
  26. cd /srv
  27. mkdir -p /srv/virtualenv
  28. /opt/apps/python-2.7.2/bin/virtualenv /srv/virtualenv/default --no-site-packages