#!/bin/bash -xue

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

function install_centos(){
    sudo yum -y install 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;

#!/bin/bash -xue

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

function install_centos(){
    sudo yum -y install python-devel libffi-devel
    # pip is not in the standard repo
    yum install epel-release
    yum install 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;

Use the epel repos as pip in not in the standard ones.
Use the epel repos as pip in not in the standard ones.

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