mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
63651e042f
Since they were released yesterday: https://morepypy.blogspot.com/2020/09/pypy-732-triple-release-python-27-36.html The archive URL had to be updated now that PyPy has migrated from BitBucket. The new URLs are from: https://www.pypy.org/download.html Skipping PyPy 3.7 for now, since it's in alpha. Closes @W-8128094@.
24 lines
760 B
Bash
Executable File
24 lines
760 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# fail hard
|
|
set -o pipefail
|
|
# fail harder
|
|
set -eu
|
|
|
|
OUT_PREFIX=$1
|
|
|
|
dep_formula=${0#$WORKSPACE_DIR/} # this is the original script, e.g. pypy-5.3.1
|
|
dep_name=$(basename $BASH_SOURCE) # this is us
|
|
dep_version=${dep_formula##*"/${dep_name}-"} # "subtract" our name from full version name
|
|
dep_package=${dep_name}-v${dep_version} # it's always "pypy2-…"
|
|
dep_dirname=${dep_package}-linux64
|
|
dep_archive_name=${dep_dirname}.tar.bz2
|
|
dep_url="https://downloads.python.org/pypy/${dep_archive_name}"
|
|
|
|
echo "Building PyPy…"
|
|
echo "${dep_url}"
|
|
|
|
curl -fL "${dep_url}" | tar jx -C "${OUT_PREFIX}" --strip-components 1 # extract to $OUT_PREFIX, drop the first directory level, which is the archive name
|
|
|
|
ln "$OUT_PREFIX/bin/pypy" "$OUT_PREFIX/bin/python"
|