classification
Title: Add platform.android_ver() to test.pythoninfo for Android platforms
Type: enhancement Stage: needs patch
Components: Cross-Build Versions: Python 3.7
process
Status: open Resolution:
Dependencies: 26855 Superseder:
Assigned To: Nosy List: Alex.Willmer, vstinner, xdegaye
Priority: normal Keywords:

Created on 2017-12-04 09:39 by xdegaye, last changed 2017-12-05 16:34 by xdegaye.

Messages (4)
msg307544 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-12-04 09:39
* The NDK version can be obtained by parsing the file $ANDROID_NDK_ROOT/source.properties.
* The versions of the SDK build-tools, emulator and platform-tools packages as well as those of the system images can be obtained by parsing the output of "$ANDROID_SDK_ROOT/tools/bin/sdkmanager --list".
msg307581 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-12-04 16:59
Maybe add a collect_android() function which would exit early if sys.getandroidapilevel() doesn't exist?

> * The NDK version can be obtained by parsing the file $ANDROID_NDK_ROOT/source.properties.
> * The versions of the SDK build-tools, emulator and platform-tools packages as well as those of the system images can be obtained by parsing the output of "$ANDROID_SDK_ROOT/tools/bin/sdkmanager --list".

You are free to add whatever you want/need, but just try to handle properly errors to collect other info even if these data cannot be read.
msg307602 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-12-04 22:25
Oh, I forgot that pythoninfo already has:

call_func(info_add, 'sys.androidapilevel', sys, 'getandroidapilevel')

Well, that's the *build time* API level, not the most useful one, but still useful.
msg307657 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2017-12-05 11:15
The NDK version may be printed by the pythoninfo make target before test.pythoninfo is run on Android.

platform.android_ver() (not yet implemented, see issue 26855) must be added to collect_sys() in test.pythoninfo.
History
Date User Action Args
2017-12-09 15:42:06xdegayelinkissue26865 dependencies
2017-12-05 16:34:30xdegayesetdependencies: + android: add platform.android_ver()
title: Add the versions of the Android SDK and NDK to test.pythoninfo -> Add platform.android_ver() to test.pythoninfo for Android platforms
2017-12-05 11:15:02xdegayesetmessages: + msg307657
2017-12-04 22:25:20vstinnersetmessages: + msg307602
2017-12-04 16:59:14vstinnersetmessages: + msg307581
2017-12-04 09:39:35xdegayecreate