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\
|
2024-09-11 01:13:41 +03:00
|
|
|
ghostscript libjpeg-turbo-progs libopenjp2-7-dev\
|
2023-04-17 11:44:43 +03:00
|
|
|
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
|
2023-09-17 15:40:42 +03:00
|
|
|
sway wl-clipboard libopenblas-dev
|
2022-05-03 00:54:49 +03:00
|
|
|
fi
|
|
|
|
|
2022-05-05 22:21:22 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
2021-07-29 12:04:48 +03:00
|
|
|
python3 -m pip install --upgrade wheel
|
2020-10-29 14:41:29 +03:00
|
|
|
python3 -m pip install coverage
|
2021-06-30 04:28:00 +03:00
|
|
|
python3 -m pip install defusedxml
|
2024-08-19 15:55:07 +03:00
|
|
|
python3 -m pip install ipython
|
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
|
2021-03-12 00:32:30 +03:00
|
|
|
python3 -m pip install -U pytest-timeout
|
2020-10-29 14:41:29 +03:00
|
|
|
python3 -m pip install pyroma
|
2017-01-19 18:54:54 +03:00
|
|
|
|
2022-02-02 07:14:31 +03:00
|
|
|
if [[ $(uname) != CYGWIN* ]]; then
|
2024-07-04 15:45:58 +03:00
|
|
|
# TODO Update condition when NumPy supports free-threading
|
2024-07-07 15:04:50 +03:00
|
|
|
if [[ "$PYTHON_GIL" == "0" ]]; then
|
2024-07-05 00:49:27 +03:00
|
|
|
python3 -m pip install numpy --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
|
|
|
|
else
|
|
|
|
python3 -m pip install numpy
|
|
|
|
fi
|
2017-01-19 18:54:54 +03:00
|
|
|
|
2022-04-25 04:00:09 +03:00
|
|
|
# PyQt6 doesn't support PyPy3
|
2023-09-02 04:37:22 +03:00
|
|
|
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
|
2023-04-11 14:13:49 +03:00
|
|
|
sudo apt-get -qq install libegl1 libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxkbcommon-x11-0
|
2024-07-04 15:45:58 +03:00
|
|
|
# TODO Update condition when pyqt6 supports free-threading
|
2024-07-07 15:04:50 +03:00
|
|
|
if ! [[ "$PYTHON_GIL" == "0" ]]; then python3 -m pip install pyqt6 ; fi
|
2022-02-02 07:14:31 +03:00
|
|
|
fi
|
2017-01-19 18:54:54 +03:00
|
|
|
|
2023-10-21 19:42:48 +03:00
|
|
|
# Pyroma uses non-isolated build and fails with old setuptools
|
2024-08-29 10:58:53 +03:00
|
|
|
if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then
|
2023-10-21 19:42:48 +03:00
|
|
|
# To match pyproject.toml
|
|
|
|
python3 -m pip install "setuptools>=67.8"
|
|
|
|
fi
|
|
|
|
|
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
|