forked from nonameentername/python-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·30 lines (25 loc) · 739 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·30 lines (25 loc) · 739 Bytes
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
#!/usr/bin/env sh
ROOTDIR=$(dirname $(readlink -f $0))
if [ ! -e 'Python-2.7.2.tgz' ]; then
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
fi
if [ ! -e 'Python-host' ]; then
tar zxvf Python-2.7.2.tgz
mv Python-2.7.2 Python-host
fi
if [ ! -e 'Python' ]; then
tar zxvf Python-2.7.2.tgz
mv Python-2.7.2 Python
cd $ROOTDIR/Python
patch -p1 < ../patch/Python-2.7.2-xcompile.patch
patch -p1 < ../patch/Python-2.7.2-android.patch
fi
if [ ! -e "$ROOTDIR/hostpython" -a ! -e "$ROOTDIR/hostpgen" ]; then
cd $ROOTDIR/Python-host
./configure --prefix=$ROOTDIR/prebuilt
make -j4
make install
mv python $ROOTDIR/hostpython
mv Parser/pgen $ROOTDIR/hostpgen
make distclean
fi