forked from TrueCloudLab/s3-tests
02a4c82dfa
Handle dependencies properly. Now e.g. "./bootstrap && ./virtualenv/bin/s3tests-test-readwrite" should just work.
28 lines
884 B
Bash
Executable file
28 lines
884 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
for package in python-pip python-virtualenv python-dev libevent-dev; 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
|
|
|
|
virtualenv --no-site-packages --distribute virtualenv
|
|
|
|
# avoid pip bugs
|
|
./virtualenv/bin/pip install --upgrade pip
|
|
|
|
./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
|