2011-05-31 20:51:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2013-06-19 18:29:38 +00:00
|
|
|
for package in python-dev python-pip python-virtualenv libevent-dev python-libvirt libmysqlclient-dev; do
|
2011-05-31 20:51:48 +00:00
|
|
|
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
|
|
|
|
|
2013-08-22 23:02:22 +00:00
|
|
|
if [ -z "$NO_CLOBBER" ] || [ ! -e ./virtualenv ]; then
|
|
|
|
# site packages needed because libvirt python bindings are not nicely
|
|
|
|
# packaged
|
|
|
|
virtualenv --system-site-packages --distribute virtualenv
|
2011-05-31 20:51:48 +00:00
|
|
|
|
2013-08-22 23:02:22 +00:00
|
|
|
# avoid pip bugs
|
|
|
|
./virtualenv/bin/pip install --upgrade pip
|
|
|
|
fi
|
2011-05-31 20:51:48 +00:00
|
|
|
|
|
|
|
./virtualenv/bin/pip install -r requirements.txt
|
|
|
|
|
|
|
|
# forbid setuptools from using the network because it'll try to use
|
|
|
|
# easy_install, and we really wanted pip; next line will fail if pip
|
|
|
|
# requirements.txt does not match setup.py requirements -- sucky but
|
|
|
|
# good enough for now
|
|
|
|
./virtualenv/bin/python setup.py develop \
|
|
|
|
--allow-hosts None
|