ceph/bootstrap

31 lines
916 B
Plaintext
Raw Normal View History

#!/bin/sh
set -e
for package in python-dev python-pip python-virtualenv libevent-dev python-libvirt; do
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo "sudo apt-get install $missing"
exit 1
fi
if [ -z "$NO_CLOBBER" ] || [ ! -e ./virtualenv ]; then
# site packages needed because libvirt python bindings are not nicely
# packaged
virtualenv --system-site-packages --setuptools virtualenv
# avoid pip bugs
./virtualenv/bin/pip install --upgrade pip
# work-around change in pip 1.5
./virtualenv/bin/pip install setuptools --no-use-wheel --upgrade
fi
./virtualenv/bin/pip install -r requirements.txt
./virtualenv/bin/python setup.py develop