#!/bin/bash -xue

sudo add-apt-repository --yes ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install --yes python2.6 python2.6-dev

sudo aptitude install -y python-dev libffi-dev python-pip
sudo pip install tox

#!/bin/bash -xue

function install_deb(){
    sudo aptitude install -y python-dev libffi-dev python-pip    
}

function install_centos(){
    sudo yum install -i python-dev libffi-dev python-pip    
}


function is_centos(){
    [[ -f /etc/centos-release ]]
}

function is_deb(){
    [[ -f /etc/debian_version ]]
}

function pip_install(){
    sudo pip install tox
}

function install(){
    if is_deb; 
        then 
            install_deb;
    elif is_centos;
        then
            install_centos;
    else
        echo "Unknown distribution" ;
        exit 1;
    fi
    pip_install;
}

install;

Add centos/deb handling during install.
Add centos/deb handling during install.

(cherry picked from commit e3d06bf8d59a5431b9f2eac69d189a8385f24776)
Signed-off-by: Nicolas Trangez <abbeee14574502be75498298fab55c152b9bac47@nicolast.be>
