Add PyPy nightly builds

This commit is contained in:
Yamashita Yuu 2014-11-29 10:55:26 +09:00
parent 60e1abe7fa
commit b986f8f93f
3 changed files with 104 additions and 20 deletions

View file

@ -144,6 +144,10 @@ install_package() {
install_package_using "tarball" 1 "$@" install_package_using "tarball" 1 "$@"
} }
install_nightly_package() {
install_package_using "nightly_tarball" 2 "$@"
}
install_git() { install_git() {
install_package_using "git" 2 "$@" install_package_using "git" 2 "$@"
} }
@ -358,6 +362,19 @@ fetch_tarball() {
} >&4 2>&1 } >&4 2>&1
} }
fetch_nightly_tarball() {
local package_name="$1"
local package_url="$2"
local package_pattern="$3"
fetch_tarball "$1" "$2"
if [ ! -e "${package_name}" ]; then
local nightly_package_name="$(echo ${package_pattern})"
if [ -e "${nightly_package_name}" ]; then
ln -fs "${nightly_package_name}" "${package_name}"
fi
fi
}
reuse_existing_tarball() { reuse_existing_tarball() {
local package_filename="$1" local package_filename="$1"
local checksum="$2" local checksum="$2"
@ -834,31 +851,28 @@ pypy_architecture() {
esac esac
;; ;;
"CYGWIN"* | "MINGW"* ) echo "win32" ;; "CYGWIN"* | "MINGW"* ) echo "win32" ;;
"FreeBSD" )
case "$(uname -m)" in
"x86_64" ) echo "freebsd64" ;;
* ) return 1 ;;
esac
;;
* ) return 1 ;; * ) return 1 ;;
esac esac
} }
build_package_pypy() { build_package_pypy() {
build_package_copy build_package_copy
{ if [ ! -x "${PREFIX_PATH}/bin/python" ]; then mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
local pypy local pypy libpypy
if [ -x "${PREFIX_PATH}/bin/pypy" ]; then shopt -s nullglob
pypy="${PREFIX_PATH}/bin/pypy" for pypy in "bin/pypy"*; do
elif [ -x "${PREFIX_PATH}/bin/pypy3" ]; then ( cd "${PREFIX_PATH}/bin" && ln -fs "$(basename "${pypy}")" "$(basename "${pypy}" | sed -e 's/pypy/python/')" )
pypy="${PREFIX_PATH}/bin/pypy3" done
fi for libpypy in "bin/libpypy-c."*; do
if [ -e "${pypy}" ]; then ( cd "${PREFIX_PATH}/lib" && ln -fs "../bin/$(basename "${libpypy}")" "$(basename "${libpypy}")" )
if [ -L "${pypy}" ]; then done
( cd "${PREFIX_PATH}/bin" && ln -fs "$(resolve_link "${pypy}")" "python" ) shopt -u nullglob
else
( cd "${PREFIX_PATH}/bin" && ln -fs "${pypy}" "python" )
fi
else
echo "not a pypy binary distribution" 1>&3
return 1
fi
fi
} >&4 2>&1
} }
build_package_pypy_builder() { build_package_pypy_builder() {
@ -875,7 +889,7 @@ build_package_pypy_builder() {
mv -f "pypy-c" "bin/pypy" mv -f "pypy-c" "bin/pypy"
fi fi
for libpypy in "libpypy-c."*; do for libpypy in "libpypy-c."*; do
mv -f "${libpypy}" "lib/" mv -f "${libpypy}" "bin/"
done done
} >&4 2>&1 } >&4 2>&1
build_package_pypy build_package_pypy

View file

@ -0,0 +1,35 @@
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
install_nightly_package "pypy-c-jit-latest-linux" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux.tar.bz2" "pypy-c-jit-*-linux" "pypy" verify_py27 ensurepip
;;
"linux-armel" )
install_nightly_package "pypy-c-jit-latest-linux-armel" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux-armel.tar.bz2" "pypy-c-jit-*-linux-armel" "pypy" verify_py27 ensurepip
;;
"linux-armhf" )
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
install_nightly_package "pypy-c-jit-latest-linux-armhf-raspbian" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux-armhf-raspbian.tar.bz2" "pypy-c-jit-*-linux-armhf-raspbian" "pypy" verify_py27 ensurepip
else
install_nightly_package "pypy-c-jit-latest-linux-armhf-raring" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux-armhf-raring.tar.bz2" "pypy-c-jit-*-linux-armhf-raring" "pypy" verify_py27 ensurepip
fi
;;
"linux64" )
install_nightly_package "pypy-c-jit-latest-linux64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux64.tar.bz2" "pypy-c-jit-*-linux64" "pypy" verify_py27 ensurepip
;;
"osx64" )
install_nightly_package "pypy-c-jit-latest-osx64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-osx64.tar.bz2" "pypy-c-jit-*-osx64" "pypy" verify_py27 ensurepip
;;
"freebsd64" )
install_nightly_package "pypy-c-jit-latest-freebsd64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-freebsd64.tar.bz2" "pypy-c-jit-*-freebsd64" "pypy" verify_py27 ensurepip
;;
#"win32" )
# install_zip "pypy-c-jit-latest-win32" "http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-win32.zip" "pypy" verify_py27 ensurepip
# ;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac

View file

@ -0,0 +1,35 @@
case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
install_nightly_package "pypy-c-nojit-latest-linux" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-linux.tar.bz2" "pypy-c-nojit-*-linux" "pypy" verify_py27 ensurepip
;;
"linux-armel" )
install_nightly_package "pypy-c-nojit-latest-linux-armel" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-linux-armel.tar.bz2" "pypy-c-nojit-*-linux-armel" "pypy" verify_py27 ensurepip
;;
"linux-armhf" )
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
install_nightly_package "pypy-c-nojit-latest-linux-armhf-raspbian" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-linux-armhf-raspbian.tar.bz2" "pypy-c-nojit-*-linux-armhf-raspbian" "pypy" verify_py27 ensurepip
else
install_nightly_package "pypy-c-nojit-latest-linux-armhf-raring" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-linux-armhf-raring.tar.bz2" "pypy-c-nojit-*-linux-armhf-raring" "pypy" verify_py27 ensurepip
fi
;;
"linux64" )
install_nightly_package "pypy-c-nojit-latest-linux64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-linux64.tar.bz2" "pypy-c-nojit-*-linux64" "pypy" verify_py27 ensurepip
;;
"osx64" )
install_nightly_package "pypy-c-nojit-latest-osx64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-osx64.tar.bz2" "pypy-c-nojit-*-osx64" "pypy" verify_py27 ensurepip
;;
"freebsd64" )
install_nightly_package "pypy-c-nojit-latest-freebsd64" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-freebsd64.tar.bz2" "pypy-c-nojit-*-freebsd64" "pypy" verify_py27 ensurepip
;;
#"win32" )
# install_zip "pypy-c-nojit-latest-win32" "http://buildbot.pypy.org/nightly/trunk/pypy-c-nojit-latest-win32.zip" "pypy" verify_py27 ensurepip
# ;;
* )
{ echo
colorize 1 "ERROR"
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
echo
} >&2
exit 1
;;
esac