|
|
|
@ -27,19 +27,47 @@ if [ "${platform}" = "freebsd" ]; then
|
|
|
|
|
|
|
|
|
|
pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python
|
|
|
|
|
elif [ "${platform}" = "rhel" ]; then
|
|
|
|
|
while true; do
|
|
|
|
|
yum install -y \
|
|
|
|
|
gcc \
|
|
|
|
|
python-devel \
|
|
|
|
|
python-jinja2 \
|
|
|
|
|
python-virtualenv \
|
|
|
|
|
python2-cryptography \
|
|
|
|
|
&& break
|
|
|
|
|
echo "Failed to install packages. Sleeping before trying again..."
|
|
|
|
|
sleep 10
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python
|
|
|
|
|
if grep '8\.' /etc/redhat-release; then
|
|
|
|
|
while true; do
|
|
|
|
|
curl -o /etc/yum.repos.d/rhel-8-beta.repo http://downloads.redhat.com/redhat/rhel/rhel-8-beta/rhel-8-beta.repo && \
|
|
|
|
|
dnf config-manager --set-enabled rhel-8-for-x86_64-baseos-beta-rpms && \
|
|
|
|
|
dnf config-manager --set-enabled rhel-8-for-x86_64-appstream-beta-rpms && \
|
|
|
|
|
yum -y module install python36 && \
|
|
|
|
|
yum install -y \
|
|
|
|
|
gcc \
|
|
|
|
|
python3-devel \
|
|
|
|
|
python3-jinja2 \
|
|
|
|
|
python3-virtualenv \
|
|
|
|
|
python3-cryptography \
|
|
|
|
|
iptables \
|
|
|
|
|
&& break
|
|
|
|
|
echo "Failed to install packages. Sleeping before trying again..."
|
|
|
|
|
sleep 10
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# When running from source our python shebang is: #!/usr/bin/env python
|
|
|
|
|
# To avoid modifying all of our scripts while running tests we make sure `python` is in our PATH.
|
|
|
|
|
if [ ! -f /usr/bin/python ]; then
|
|
|
|
|
ln -s /usr/bin/python3 /usr/bin/python
|
|
|
|
|
fi
|
|
|
|
|
if [ ! -f /usr/bin/pip ]; then
|
|
|
|
|
ln -s /usr/bin/pip3 /usr/bin/pip
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
while true; do
|
|
|
|
|
yum install -y \
|
|
|
|
|
gcc \
|
|
|
|
|
python-devel \
|
|
|
|
|
python-jinja2 \
|
|
|
|
|
python-virtualenv \
|
|
|
|
|
python2-cryptography \
|
|
|
|
|
&& break
|
|
|
|
|
echo "Failed to install packages. Sleeping before trying again..."
|
|
|
|
|
sleep 10
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
pip --version 2>/dev/null || curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | python
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${platform}" = "freebsd" ] || [ "${platform}" = "osx" ]; then
|
|
|
|
|