[macOS] Hardcode PyPy 7.3.1 for macOS-10.13 (#1693)
* remove workaround + install 7.3.1 for hs * get back workaround for 7.3.1 * change order
This commit is contained in:
@@ -66,16 +66,20 @@ function InstallPyPy
|
|||||||
rm -f $PACKAGE_TAR_TEMP_PATH
|
rm -f $PACKAGE_TAR_TEMP_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
# PyPy 7.3.1 relies on system libffi.6.dylib, which is not existed in in libffi 3.3 release. As a workaround symlink can be created
|
|
||||||
ln -s libffi.7.dylib /usr/local/opt/libffi/lib/libffi.6.dylib
|
|
||||||
|
|
||||||
uri="https://downloads.python.org/pypy/"
|
uri="https://downloads.python.org/pypy/"
|
||||||
pypyVersions=$(curl -4 -s --compressed $uri | grep 'osx64' | awk -v uri="$uri" -F'>|<' '{print uri$5}')
|
pypyVersions=$(curl -4 -s --compressed $uri | grep 'osx64' | awk -v uri="$uri" -F'>|<' '{print uri$5}')
|
||||||
|
|
||||||
toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]')
|
toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]')
|
||||||
|
versionPattern="v[0-9]+\.[0-9]+\.[0-9]+-"
|
||||||
|
|
||||||
|
# PyPy 7.3.2 for High Sierra is broken, use 7.3.1 instead https://foss.heptapod.net/pypy/pypy/-/issues/3311
|
||||||
|
if is_HighSierra; then
|
||||||
|
versionPattern="v7.3.1-"
|
||||||
|
# PyPy 7.3.1 relies on system libffi.6.dylib, which is not existed in in libffi 3.3 release. As a workaround symlink can be created
|
||||||
|
ln -s libffi.7.dylib /usr/local/opt/libffi/lib/libffi.6.dylib
|
||||||
|
fi
|
||||||
|
|
||||||
for toolsetVersion in $toolsetVersions; do
|
for toolsetVersion in $toolsetVersions; do
|
||||||
latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-v[0-9]+\.[0-9]+\.[0-9]+-" | head -1)
|
latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-${versionPattern}" | head -1)
|
||||||
if [[ -z "$latestMajorPyPyVersion" ]]; then
|
if [[ -z "$latestMajorPyPyVersion" ]]; then
|
||||||
echo "Failed to get PyPy version '$toolsetVersion'"
|
echo "Failed to get PyPy version '$toolsetVersion'"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user