2023-11-14 15:23:46 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2024-10-29 02:46:59 +03:00
|
|
|
# Ensure fribidi is installed by the system.
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
# If Homebrew is on the path during the build, it may leak into the wheels.
|
2024-10-30 00:43:23 +03:00
|
|
|
# However, we *do* need Homebrew to provide a copy of fribidi for
|
2024-10-29 02:46:59 +03:00
|
|
|
# testing purposes so that we can verify the fribidi shim works as expected.
|
|
|
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
|
|
|
HOMEBREW_HOME=/usr/local/homebrew
|
2024-10-25 04:23:13 +03:00
|
|
|
else
|
2024-10-29 02:46:59 +03:00
|
|
|
HOMEBREW_HOME=/opt/homebrew
|
2024-03-02 15:36:19 +03:00
|
|
|
fi
|
2024-10-29 02:46:59 +03:00
|
|
|
$HOMEBREW_HOME/bin/brew install fribidi
|
|
|
|
|
|
|
|
# Add the Homebrew lib folder so that vendored libraries can be found.
|
|
|
|
export DYLD_LIBRARY_PATH=$HOMEBREW_HOME/lib
|
|
|
|
elif [ "${AUDITWHEEL_POLICY::9}" == "musllinux" ]; then
|
|
|
|
apk add curl fribidi
|
|
|
|
else
|
|
|
|
yum install -y fribidi
|
2023-11-14 15:23:46 +03:00
|
|
|
fi
|
2024-07-09 23:11:11 +03:00
|
|
|
|
2024-09-13 00:34:56 +03:00
|
|
|
python3 -m pip install numpy
|
2023-11-14 15:23:46 +03:00
|
|
|
|
|
|
|
if [ ! -d "test-images-main" ]; then
|
|
|
|
curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
|
|
|
|
unzip pillow-test-images.zip
|
|
|
|
mv test-images-main/* Tests/images
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Runs tests
|
|
|
|
python3 selftest.py
|
2023-01-01 05:18:30 +03:00
|
|
|
python3 -m pytest Tests/check_wheel.py
|
2023-11-14 15:23:46 +03:00
|
|
|
python3 -m pytest
|