diff --git a/bootstrap b/bootstrap index 95f2f1d..775d9a5 100755 --- a/bootstrap +++ b/bootstrap @@ -13,9 +13,18 @@ if [ -f /etc/debian_version ]; then echo " sudo apt-get install $missing" exit 1 fi -fi -if [ -f /etc/redhat-release ]; then - for package in python-pip python-virtualenv python-devel libevent-devel; do +elif [ -f /etc/fedora-release ]; then + for package in python-pip python2-virtualenv python-devel libevent-devel; do + if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required RPM packages. Installing via sudo." 1>&2 + sudo yum -y install $missing + fi +elif [ -f /etc/redhat-release ]; then + for package in python2-pip python-virtualenv python-devel libevent-devel; do if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then missing="${missing:+$missing }$package" fi @@ -32,8 +41,8 @@ virtualenv --no-site-packages --distribute virtualenv # avoid pip bugs ./virtualenv/bin/pip install --upgrade pip -# work-around change in pip 1.5 -./virtualenv/bin/pip install setuptools --upgrade +# slightly old version of setuptools; newer fails w/ requests 0.14.0 +./virtualenv/bin/pip install setuptools==32.3.1 ./virtualenv/bin/pip install -r requirements.txt