2017-11-13 17:34:21 +08:00
|
|
|
#!/bin/bash
|
2015-12-31 05:15:18 +08:00
|
|
|
set -e
|
|
|
|
|
2016-02-20 01:48:53 +08:00
|
|
|
BINDIR="/opt/bin"
|
2020-05-06 19:49:08 +08:00
|
|
|
PYPY_VERSION=7.3.1
|
|
|
|
PYPI_URL="https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v${PYPY_VERSION}-linux64.tar.bz2"
|
|
|
|
PYPI_HASH=f67cf1664a336a3e939b58b3cabfe47d893356bdc01f2e17bc912aaa6605db12
|
2015-12-31 05:15:18 +08:00
|
|
|
|
2016-05-13 17:48:13 +08:00
|
|
|
mkdir -p $BINDIR
|
|
|
|
|
2015-12-31 05:15:18 +08:00
|
|
|
cd $BINDIR
|
|
|
|
|
|
|
|
if [[ -e $BINDIR/.bootstrapped ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2020-05-06 19:49:08 +08:00
|
|
|
TAR_FILE=pyp.tar.bz2
|
|
|
|
wget -O "${TAR_FILE}" "${PYPI_URL}"
|
|
|
|
echo "${PYPI_HASH} ${TAR_FILE}" | sha256sum -c -
|
|
|
|
tar -xjf "${TAR_FILE}" && rm "${TAR_FILE}"
|
|
|
|
mv -n "pypy3.6-v${PYPY_VERSION}-linux64" pypy3
|
2015-12-31 05:15:18 +08:00
|
|
|
|
2019-01-12 22:04:33 +08:00
|
|
|
ln -s ./pypy3/bin/pypy3 python
|
2015-12-31 05:15:18 +08:00
|
|
|
$BINDIR/python --version
|
|
|
|
|
|
|
|
touch $BINDIR/.bootstrapped
|