mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 13:47:27 +00:00
9a22d94aeb
Setuptools needs to be upgraded with --no-use-wheel. A change we already were using in other projects. Signed-off-by: Sandon Van Ness <sandon@inktank.com>
45 lines
1.5 KiB
Bash
Executable file
45 lines
1.5 KiB
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
if [ -f /etc/debian_version ]; then
|
|
for package in python-pip python-virtualenv python-dev libevent-dev; do
|
|
if [ "$(dpkg --status -- $package 2>/dev/null|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
|
|
fi
|
|
if [ -f /etc/redhat-release ]; then
|
|
for package in python-pip python-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 packages, please install them:" 1>&2
|
|
echo " sudo yum install $missing"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
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 --no-use-wheel --upgrade
|
|
|
|
./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
|