-
Notifications
You must be signed in to change notification settings - Fork 38
/
package
executable file
·83 lines (60 loc) · 1.99 KB
/
package
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
set -e
REVISION=$1
export PATH=/opt/pypy/bin:$PATH
env
INPUTNAME=`find pypy-$REVISION -name "pypy*-c"`
NAME=`$INPUTNAME version.py`
echo using $NAME
BINNAME=pypy
if [[ $NAME == pypy3* ]]; then
BINNAME=${NAME:0:7}
fi
echo binname $BINNAME
cd pypy-$REVISION
python pypy/tool/release/package.py --rename_pypy_c $BINNAME --archive-name pypy-$REVISION --targetdir /src --override_pypy_c ./../$INPUTNAME
cd -
rm -rf pypy-pack-$REVISION
mkdir pypy-pack-$REVISION
tar -C pypy-pack-$REVISION --strip-components=1 -xjf pypy-$REVISION.tar.bz2
if [[ $NAME == pypy3* ]]; then
cd pypy-pack-$REVISION/bin
ln -s $BINNAME pypy
ln -s $BINNAME pypy3
ln -s $BINNAME python3
ln -s $BINNAME python3.${NAME:6:1}
cd -
fi
./make_portable pypy-pack-$REVISION
cd pypy-pack-$REVISION/lib
ln -s libssl* libssl.so
ln -s libcrypto* libcrypto.so
cd -
(
mkdir -p pypy-pack-$REVISION/virtualenv/virtualenv_support
cd pypy-pack-$REVISION/virtualenv
wget https://raw.githubusercontent.com/pypa/virtualenv/16.7.6/virtualenv.py
cd virtualenv_support
touch __init__.py
wget https://github.com/pypa/virtualenv/raw/16.7.6/virtualenv_support/pip-19.1.1-py2.py3-none-any.whl
wget https://github.com/pypa/virtualenv/raw/16.7.6/virtualenv_support/pip-19.3-py2.py3-none-any.whl
wget https://github.com/pypa/virtualenv/raw/16.7.6/virtualenv_support/setuptools-41.4.0-py2.py3-none-any.whl
wget https://github.com/pypa/virtualenv/raw/16.7.6/virtualenv_support/wheel-0.33.6-py2.py3-none-any.whl
)
if [[ $NAME != pypy3* ]]; then
cd pypy-pack-$REVISION/lib-python/2.7
else
cd pypy-pack-$REVISION/lib-python/3
fi
wget https://raw.githubusercontent.com/certifi/python-certifi/master/certifi/cacert.pem
cd -
cp /src/virtualenv-pypy pypy-pack-$REVISION/bin/virtualenv-pypy
rm -rf $NAME
mv pypy-pack-$REVISION $NAME
# clean __pycache__
find ./${NAME} -name "__pycache__" | xargs rm -rf >/dev/null 2>&1
rm -f ${NAME}.tar.bz2
tar -cjf ${NAME}.tar.bz2 $NAME
md5sum ${NAME}.tar.bz2
sha1sum ${NAME}.tar.bz2
sha256sum ${NAME}.tar.bz2