+ # We need to fuse our own universal2 wheels for curl_cffi
+ python3 -m pip install -U --user delocate
+ mkdir curl_cffi_whls curl_cffi_universal2
+ python3 devscripts/install_deps.py --print -o --include curl-cffi > requirements.txt
+ for platform in "macosx_11_0_arm64" "macosx_11_0_x86_64"; do
+ python3 -m pip download \
+ --only-binary=:all: \
+ --platform "${platform}" \
+ --pre -d curl_cffi_whls \
+ -r requirements.txt
+ done
+ ( # Overwrite x86_64-only libs with fat/universal2 libs or else Pyinstaller will do the opposite
+ # See https://github.com/yt-dlp/yt-dlp/pull/10069
+ cd curl_cffi_whls
+ mkdir -p curl_cffi/.dylibs
+ python_libdir=$(python3 -c 'import sys; from pathlib import Path; print(Path(sys.path[1]).parent)')
+ for dylib in lib{ssl,crypto}.3.dylib; do
+ cp "${python_libdir}/${dylib}" "curl_cffi/.dylibs/${dylib}"
+ for wheel in curl_cffi*macos*x86_64.whl; do
+ zip "${wheel}" "curl_cffi/.dylibs/${dylib}"
+ done
+ done
+ )
+ python3 -m delocate.cmd.delocate_fuse curl_cffi_whls/curl_cffi*.whl -w curl_cffi_universal2
+ python3 -m delocate.cmd.delocate_fuse curl_cffi_whls/cffi*.whl -w curl_cffi_universal2
+ cd curl_cffi_universal2
+ for wheel in ./*cffi*.whl; do mv -n -- "${wheel}" "${wheel/x86_64/universal2}"; done
+ python3 -m pip install -U --user ./*cffi*.whl