[Python-Dev] Support of the Android platform (original) (raw)

Xavier de Gaye xdegaye at gmail.com
Sun Dec 10 09:19:11 EST 2017


The following note is a proposal to add the support of the Android platform.

The note is easier to read with clickable links at https://github.com/xdegaye/cagibi/blob/master/doc/android_support.rst

Motivations

Current status

Proposal

Support the Android platform on API 24 [1]_ for the x86_64, armv7 and arm64 architectures built with NDK 14b.

API 24

x86_64 It seems that no handheld device exists using that architecture. It is supported because the x86_64 Android emulator runs fast and therefore is a good candidate as a buildbot worker.

NDK 14b This release of the NDK is the first one to use Unified headers_ fixing numerous problems that had been fixed by updating the Python configure script until now (those changes have been reverted by now).

Android idiosyncrasies

Android build system

The Android build system is implemented at bpo-30386_ with PR 1629_ and is documented by its README_. It provides the following features:

The build system adds the Android/ directory and the configure-android script to the root of the Python source directory on the master branch without modifying any other file. The build system can be installed, upgraded (i.e. the SDK and NDK) and run remotely, through ssh for example.

The following external libraries, when they are configured in the build system, are downloaded from the internet and cross-compiled (only once, on the first run of the build system) before the cross-compilation of the extension modules:

The following extension modules are disabled by adding them to the *disabled* section of Modules/Setup:

.. [1] On Wikipedia Android version history_ lists the correspondence between API level, commercial name and version for each release. It also provides information on the global Android version distribution, see the two charts on top.

.. _README: https://github.com/xdegaye/cpython/blob/bpo-30386/Android/README.rst .. _bpo-26865: https://bugs.python.org/issue26865 .. _bpo-30386: https://bugs.python.org/issue30386 .. _bpo-32202: https://bugs.python.org/issue32202 .. _bpo-32203: https://bugs.python.org/issue32203 .. _PR 1629: https://github.com/python/cpython/pull/1629 .. _buildmaster-config PR 26: https://github.com/python/buildmaster-config/pull/26 .. _Android version history: https://en.wikipedia.org/wiki/Android_version_history .. _termux: https://termux.com/ .. _termux-packages: https://gitlab.com/jbwhips883/termux-packages .. _adb: https://developer.android.com/studio/command-line/adb.html .. _Unified headers: https://android.googlesource.com/platform/ndk.git/+/ndk-r14-release/docs/UnifiedHeaders.md .. _HP 41: https://en.wikipedia.org/wiki/HP-41C .. vim:filetype=rst:tw=78:ts=8:sts=2:sw=2:et:



More information about the Python-Dev mailing list