You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
584 B

  1. #!/bin/bash
  2. set -e
  3. BINDIR="/opt/bin"
  4. PYPY_VERSION=7.3.1
  5. PYPI_URL="https://downloads.python.org/pypy/pypy3.6-v${PYPY_VERSION}-linux64.tar.bz2"
  6. PYPI_HASH=f67cf1664a336a3e939b58b3cabfe47d893356bdc01f2e17bc912aaa6605db12
  7. mkdir -p $BINDIR
  8. cd $BINDIR
  9. if [[ -e $BINDIR/.bootstrapped ]]; then
  10. exit 0
  11. fi
  12. TAR_FILE=pyp.tar.bz2
  13. wget -O "${TAR_FILE}" "${PYPI_URL}"
  14. echo "${PYPI_HASH} ${TAR_FILE}" | sha256sum -c -
  15. tar -xjf "${TAR_FILE}" && rm "${TAR_FILE}"
  16. mv -n "pypy3.6-v${PYPY_VERSION}-linux64" pypy3
  17. ln -s ./pypy3/bin/pypy3 python
  18. $BINDIR/python --version
  19. touch $BINDIR/.bootstrapped