This repository was archived by the owner on Mar 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
docker/build_scripts_pypy Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 22
33set -ex
44
5+ function get_shortdir {
6+ local exe=$1
7+ $exe -c ' import sys; print("pypy%d.%d-%d.%d.%d" % (sys.version_info[:2]+sys.pypy_version_info[:3]))'
8+ }
9+
10+ # this is more or less equivalent to do_cpython_build, although we download a
11+ # prebuilt pypy instead of building it from scratch
512function install_one_pypy {
613 local tarball=$1
14+ local basename=$( basename $tarball )
15+ local outdir=/opt/pypy/${basename/ .tar.bz2// }
716
817 mkdir -p /opt/pypy
918 cd /opt/pypy
1019 tar xf $tarball
20+
21+ # rename the directory to something shorter like pypy2.7-7.1.1
22+ shortdir=$( get_shortdir $outdir /bin/pypy)
23+ mv " $outdir " " $shortdir "
24+ local pypy=$shortdir /bin/pypy
25+
26+ # remove debug symbols
27+ rm $shortdir /bin/* .debug
28+
29+ # install and upgrade pip
30+ $pypy -m ensurepip
31+ $pypy -m pip install -U --require-hashes -r /build_scripts/requirements.txt
32+
33+ local abi_tag=$( $pypy /build_scripts/python-tag-abi-tag.py)
34+ ln -s /opt/pypy/$shortdir /opt/python/${abi_tag}
1135}
1236
1337for PYPY in /pypy* .tar.bz2
1438do
1539 install_one_pypy " $PYPY "
40+ rm " $PYPY "
1641done
You can’t perform that action at this time.
0 commit comments