VERSION='7.3.3'
PYVER='3.6'

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#f183c61e66fd2c536a65695bd7ff770748c2884c235a589b9c6ac63690770c69" "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#4fb85fdd516482cab727bb9473b066ff8fb672940dedf7ccc32bf92957d29e0a" "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#bc82cf7f0182b942a2cfad4a0d167f364bfbf18f434e100a2fe62bc88547ac9b" "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#84126fcb957f260de221244222152c981643144df1d817329781f555daa52e35" "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#b935253877b703d29b1b11f79e66944f1f88adb8a76f871abf765d4de9d25f8a" "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
