50 lines
2.0 KiB
Plaintext
50 lines
2.0 KiB
Plaintext
require_distro() {
|
|
if [[ "$(cat /etc/issue 2>/dev/null || true)" != "$1"* ]]; then
|
|
{ echo
|
|
colorize 1 "WARNING"
|
|
echo ": The binary distribution of PyPy is built for $1."
|
|
echo "installed binary may not run expectedly on other platforms."
|
|
echo
|
|
} >&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
case "$(pypy_architecture 2>/dev/null || true)" in
|
|
"linux" )
|
|
require_distro "Ubuntu 10.04" || true
|
|
install_package "pypy-2.0" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-linux.tar.bz2#267c46ed8c591da19b6091aa90fa9acf" "pypy" verify_py27
|
|
;;
|
|
"linux-armel" )
|
|
require_distro "Ubuntu 12.04" || true
|
|
install_package "pypy-2.0-alpha-arm" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-alpha-arm-armel.tar.bz2#b9c36b99296c85a590c3e480b05d5a13" "pypy" verify_py27
|
|
;;
|
|
"linux-armhf" )
|
|
require_distro "Ubuntu 12.04" || true
|
|
install_package "pypy-2.0-alpha-arm" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-alpha-arm-armhf.tar.bz2#2565ce68b4032eb306d998e722495694" "pypy" verify_py27
|
|
;;
|
|
"linux64" )
|
|
require_distro "Ubuntu 12.04" || true
|
|
install_package "pypy-2.0" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-linux64.tar.bz2#2fe3298ac9354fbdb57a38472936b823" "pypy" verify_py27
|
|
;;
|
|
"osx64" )
|
|
install_package "pypy-2.0" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-osx64.tar.bz2#39837722da4a03ca03eda187aafa13bb" "pypy" verify_py27
|
|
;;
|
|
"win32" )
|
|
# FIXME: never tested on Windows
|
|
install_zip "pypy-2.0" "https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-win32.zip#f0d051c2b612b64dff496a6c0f3654fb" "pypy" verify_py27
|
|
;;
|
|
* )
|
|
{ echo
|
|
colorize 1 "ERROR"
|
|
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
|
echo "try 'pypy-2.0-src' to build from soruce."
|
|
echo
|
|
} >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
install_package "setuptools-3.6" "https://pypi.python.org/packages/source/s/setuptools/setuptools-3.6.tar.gz#8f3a1dcdc14313c8334eb6af4f66ea0a" python
|
|
install_package "pip-1.5.6" "https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#01026f87978932060cc86c1dc527903e" python
|