Pillow/.ci/install.sh

65 lines
1.7 KiB
Bash
Raw Normal View History

2017-01-19 18:54:54 +03:00
#!/bin/bash
2020-04-06 15:23:41 +03:00
aptget_update()
{
if [ ! -z $1 ]; then
echo ""
echo "Retrying apt-get update..."
echo ""
fi
output=`sudo apt-get update 2>&1`
echo "$output"
if [[ $output == *[WE]:\ * ]]; then
return 1
fi
}
2022-02-02 07:14:31 +03:00
if [[ $(uname) != CYGWIN* ]]; then
aptget_update || aptget_update retry || aptget_update retry
fi
2020-04-06 15:23:41 +03:00
2017-01-19 18:54:54 +03:00
set -e
2022-02-02 07:14:31 +03:00
if [[ $(uname) != CYGWIN* ]]; then
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
python3 -m pip install --upgrade pip
fi
python3 -m pip install --upgrade wheel
2020-10-29 14:41:29 +03:00
python3 -m pip install coverage
python3 -m pip install defusedxml
2020-10-29 14:41:29 +03:00
python3 -m pip install olefile
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install -U pytest-timeout
2020-10-29 14:41:29 +03:00
python3 -m pip install pyroma
python3 -m pip install test-image-results
2017-01-19 18:54:54 +03:00
2022-02-02 07:14:31 +03:00
if [[ $(uname) != CYGWIN* ]]; then
PYTHONOPTIMIZE=0 python3 -m pip install cffi
python3 -m pip install numpy
2017-01-19 18:54:54 +03:00
2022-02-02 07:14:31 +03:00
# PyQt5 doesn't support PyPy3
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
# arm64, ppc64le, s390x CPUs:
# "ERROR: Could not find a version that satisfies the requirement pyqt5"
sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
python3 -m pip install pyqt5
fi
2017-01-19 18:54:54 +03:00
2022-02-02 07:14:31 +03:00
# webp
pushd depends && ./install_webp.sh && popd
2019-07-03 16:03:09 +03:00
2022-02-02 07:14:31 +03:00
# libimagequant
pushd depends && ./install_imagequant.sh && popd
# raqm
pushd depends && ./install_raqm.sh && popd
# extra test images
pushd depends && ./install_extra_test_images.sh && popd
else
cd depends && ./install_extra_test_images.sh && cd ..
fi