forked from ericmoritz/wsdemo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_pypy.sh
More file actions
executable file
·24 lines (22 loc) · 873 Bytes
/
install_pypy.sh
File metadata and controls
executable file
·24 lines (22 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# install PyPy
PYPY_VERSION="1.9"
PYPY_PREFIX="/usr/local"
PYPY_URL="http://cdn.bitbucket.org/pypy/pypy/downloads/pypy-$PYPY_VERSION-linux.tar.bz2"
if [ ! -d "$PYPY_PREFIX/pypy-$PYPY_VERSION" ]; then
echo ">>> Installing PyPy-$PYPY_VERSION into $PYPY_PREFIX/pypy-$PYPY_VERSION <<<"
pushd "$PYPY_PREFIX"
# bootstrap
curl "$PYPY_URL" | sudo tar xj
PYPY="pypy-$PYPY_VERSION/bin/pypy"
curl "http://python-distribute.org/distribute_setup.py" | sudo "$PYPY"
sudo "pypy-$PYPY_VERSION/bin/easy_install" pip
# symlinks
sudo mkdir -p bin
sudo ln -s "../$PYPY" bin/pypy
sudo ln -s "../pypy-$PYPY_VERSION/bin/pip" bin/pip-pypy
# packages
sudo pip-pypy install tornado twisted txws
popd
fi
echo "=== PyPy-$PYPY_VERSION is installed at $PYPY_PREFIX/pypy-$PYPY_VERSION ==="