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 2
2
3
3
set -ex
4
4
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
5
12
function install_one_pypy {
6
13
local tarball=$1
14
+ local basename=$( basename $tarball )
15
+ local outdir=/opt/pypy/${basename/ .tar.bz2// }
7
16
8
17
mkdir -p /opt/pypy
9
18
cd /opt/pypy
10
19
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}
11
35
}
12
36
13
37
for PYPY in /pypy* .tar.bz2
14
38
do
15
39
install_one_pypy " $PYPY "
40
+ rm " $PYPY "
16
41
done
You can’t perform that action at this time.
0 commit comments