This is an experimental set of build scripts that will cross-compile the latest Python 3 git master for an Android device.
Building requires:
- Linux or macOS. Ubuntu 14.04, Arch Linux and macOS Sierra tested.
- Android NDK r14 beta 1 or above installed and environment variable
$ANDROID_NDKpoints to its root directory. NDk r13 or below is not supported. - git and python3.7 in $PATH
Running requires:
- Android 5.0 (Lollipop, API 21) or above
- arm, arm64, x86, x86-64, MIPS or MIPS64
make cleanfor good measure.- For every API Level/architecture combination you wish to build for:
- Edit
envto match your (desired) configuration. maketo build everything!
- Edit
- Make sure
adb shellworks fine bash ./devscript/send.shcopies all files to/data/local/tmp/python3on the device- In adb shell:
cd /data/local/tmp . ./python3/tools/env.sh python3.7m
And have fun!
SSL certificates have old and new naming schemes. Android uses the old scheme yet the latest OpenSSL uses the new one. If you got CERTIFICATE_VERIFY_FAILED when using SSL/TLS in Python, you need to generating certificate names of the new scheme:
python3.7m ./python3/tools/c_rehash.py
Check SSL/TLS functionality with:
python3.7m ./python3/tools/ssl_test.py
No big issues! yay