mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-23 03:38:41 +00:00
e58fe8d627
Fixes: https://tracker.ceph.com/issues/45691
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b7f47c2a31
)
Conflicts:
bootstrap: trivial resolution
51 lines
1.9 KiB
Bash
Executable file
51 lines
1.9 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 libffi-dev libxml2-dev libxslt-dev zlib1g-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 DEB packages. Installing via sudo." 1>&2
|
|
sudo apt-get -y install $missing
|
|
fi
|
|
elif [ -f /etc/fedora-release ]; then
|
|
for package in python-pip python2-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-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 python-virtualenv python-devel libevent-devel libffi-devel libxml2-devel libxslt-devel zlib-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
|
|
fi
|
|
|
|
virtualenv --no-site-packages --distribute virtualenv
|
|
|
|
# avoid pip bugs
|
|
./virtualenv/bin/pip install --upgrade pip
|
|
|
|
# latest setuptools supporting python 2.7
|
|
./virtualenv/bin/pip install setuptools==44.1.0
|
|
|
|
./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
|