Revert fribidi/raqm changes for macOS builds.

This commit is contained in:
Russell Keith-Magee 2024-10-29 07:46:59 +08:00
parent 3e4be4b235
commit 08554684b3
No known key found for this signature in database
GPG Key ID: 3D2DAB6A37BB5BC3
4 changed files with 19 additions and 13 deletions

View File

@ -155,11 +155,6 @@ function build {
fi
build_harfbuzz
if [ -n "$IS_MACOS" ]; then
build_simple fribidi $FRIBIDI_VERSION https://github.com/fribidi/fribidi/releases/download/v$FRIBIDI_VERSION tar.xz --enable-shared
build_raqm
fi
}
# Perform all dependency builds in the build subfolder.

View File

@ -1,13 +1,24 @@
#!/bin/bash
set -e
# For Unix, ensure fribidi is installed by the system.
if [[ "$OSTYPE" != "darwin"* ]]; then
if [ "${AUDITWHEEL_POLICY::9}" == "musllinux" ]; then
apk add curl fribidi
# 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.
# However, we need a *do* need Homebrew to provide a copy of fribidi for
# testing purposes so that we can verify the fribidi shim works as expected.
if [[ "$(uname -m)" == "x86_64" ]]; then
HOMEBREW_HOME=/usr/local/homebrew
else
yum install -y fribidi
HOMEBREW_HOME=/opt/homebrew
fi
$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
fi
python3 -m pip install numpy

View File

@ -95,8 +95,8 @@ before-all = ".github/workflows/wheels-dependencies.sh"
build-verbosity = 1
config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable"
# Add an explicit dependencies prefix for macOS, and don't request vendored libraries.
macos.config-settings = "raqm=enable imagequant=disable dependencies-prefix=./build/deps"
# Add an explicit dependencies prefix for macOS.
macos.config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable dependencies-prefix=./build/deps"
test-command = "cd {project} && .github/workflows/wheels-test.sh"
test-extras = "tests"

View File

@ -454,7 +454,7 @@ class pil_build_ext(build_ext):
def get_macos_sdk_path(self) -> str | None:
try:
sdk_path = (
subprocess.check_output(["xcrun", "--show-sdk-path"])
subprocess.check_output(["xcrun", "--show-sdk-path", "--sdk", "macosx"])
.strip()
.decode("latin1")
)