VERSION='7.3.4'
PYVER='2.7'

case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
  install_package "pypy${PYVER}-v${VERSION}-linux32" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux32.tar.bz2#653cc3f0612399e494021027f4463d62639dffa4345736a16d0704f3f8a61d5f" "pypy" "verify_py${PYVER//./}" ensurepip
  ;;
"linux64" )
  install_package "pypy${PYVER}-v${VERSION}-linux64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux64.tar.bz2#d3f7b0625e770d9be62201765d7d2316febc463372fba9c93a12969d26ae03dd" "pypy" "verify_py${PYVER//./}" ensurepip
  ;;
"linux-aarch64" )
  install_package "pypy${PYVER}-v${VERSION}-aarch64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-aarch64.tar.bz2#9e741162ce486b14fbcf5aa377796d26b0529a9352fb602ee8b66c005f8420d1" "pypy" "verify_py${PYVER//./}" ensurepip
  ;;
"osx64" )
  if require_osx_version "10.13"; then
    install_package "pypy${PYVER}-v${VERSION}-osx64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-osx64.tar.bz2#ee7bf42ce843596521e02c763408a5164d18f23c9617f1b8e032ce0675686582" "pypy" "verify_py${PYVER//./}" ensurepip
  else
    { echo
      colorize 1 "ERROR"
      echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
      echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
      echo
    } >&2
    exit 1
  fi
  ;;
"win32" )
  install_zip "pypy${PYVER}-v${VERSION}-win32" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-win32.zip#1080012d7a3cea65182528259b51d52b1f61a3717377c2d9ba11ef36e06162d5" "pypy" "verify_py${PYVER//./}" ensurepip
  ;;
* )
  { echo
    colorize 1 "ERROR"
    echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
    echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
    echo
  } >&2
  exit 1
  ;;
esac
