[MacOS] Slight rework of the PyPy installation (#4394)
This commit is contained in:
@@ -75,13 +75,14 @@ function InstallPyPy
|
|||||||
rm -f $PACKAGE_TAR_TEMP_PATH
|
rm -f $PACKAGE_TAR_TEMP_PATH
|
||||||
}
|
}
|
||||||
|
|
||||||
uri="https://downloads.python.org/pypy/"
|
pypyVersions=$(curl https://downloads.python.org/pypy/versions.json)
|
||||||
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]+-"
|
|
||||||
|
|
||||||
for toolsetVersion in $toolsetVersions; do
|
for toolsetVersion in $toolsetVersions; do
|
||||||
latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-${versionPattern}" | head -1)
|
latestMajorPyPyVersion=$(echo $pypyVersions |
|
||||||
|
jq -r --arg toolsetVersion $toolsetVersion '.[]
|
||||||
|
| select((.python_version | startswith($toolsetVersion)) and .stable == true).files[]
|
||||||
|
| select(.platform == "darwin").download_url' | 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