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.

31 lines
585 B

  1. #!/bin/bash
  2. set -e
  3. BINDIR="/opt/bin"
  4. mkdir -p $BINDIR
  5. cd $BINDIR
  6. if [[ -e $BINDIR/.bootstrapped ]]; then
  7. exit 0
  8. fi
  9. PYPY_VERSION=5.1.0
  10. wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy-$PYPY_VERSION-linux64.tar.bz2 |tar -xjf -
  11. mv -n pypy-$PYPY_VERSION-linux64 pypy
  12. ## library fixup
  13. mkdir -p pypy/lib
  14. ln -snf /lib64/libncurses.so.5.9 $BINDIR/pypy/lib/libtinfo.so.5
  15. cat > $BINDIR/python <<EOF
  16. #!/bin/bash
  17. LD_LIBRARY_PATH=$BINDIR/pypy/lib:$LD_LIBRARY_PATH exec $BINDIR/pypy/bin/pypy "\$@"
  18. EOF
  19. chmod +x $BINDIR/python
  20. $BINDIR/python --version
  21. touch $BINDIR/.bootstrapped