forked from GRRedWings/python3-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·33 lines (27 loc) · 794 Bytes
/
build.sh
File metadata and controls
executable file
·33 lines (27 loc) · 794 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
31
32
33
#!/bin/bash
set -e
set -x
THIS_DIR="$PWD"
PYVER=3.11.0
SRCDIR=src/Python-$PYVER
COMMON_ARGS="--arch ${ARCH:-arm} --api ${ANDROID_API:-23}"
if [ ! -d $SRCDIR ]; then
mkdir -p src
pushd src
curl -vLO https://www.python.org/ftp/python/$PYVER/Python-$PYVER.tar.xz
# Use --no-same-owner so that files extracted are still owned by the
# running user in a rootless container
tar --no-same-owner -xf Python-$PYVER.tar.xz
popd
fi
cp -r Android $SRCDIR
pushd $SRCDIR
patch -Np1 -i ./Android/unversioned-libpython.patch
autoreconf -ifv
./Android/build_deps.py $COMMON_ARGS
./Android/configure.py $COMMON_ARGS --prefix=/usr "$@"
make
make install DESTDIR="$THIS_DIR/build"
popd
cp -r $SRCDIR/Android/sysroot/usr/share/terminfo build/usr/share/
cp devscripts/env.sh build/