You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android-ndk-r14 introduces "Unified Headers" [1] and is planned to be released late january/early february 2017 [2].
__ANDROID_API__ is not anymore defined in 'android/api-level.h' that is currently included by Include/pyport.h, and is passed instead with -D__ANDROID_API__=$API when compiling. And 'android/api-level.h' is now used to set the API level to 10000 as a Magic version number for a current development build when __ANDROID_API__ is not defined (see attached file).
Adoption of android-ndk-r14 should be made with the following changes:
Remove the include of <android/api-level.h> in Include/pyport.h.
Update configure.ac to abort when __ANDROID__ is defined and __ANDROID_API__ is not defined.
Revert the changes made in issues bpo-28538 and bpo-28762, android-ndk-r14 fixes the problems raised in these two issues.
Thanks for compiling up necessary changes for NDK r14! Seems that indicates future Python versions will require at least NDK r14 to build?
Another headache from unified headers is that it requires different --sysroot in compilation and linking. Currently setup.py/distutils does not cope with it well. See my dirty hack at [1] for an ad-hoc workaround.
Activity
xdegaye commentedon Dec 21, 2016
android-ndk-r14 introduces "Unified Headers" [1] and is planned to be released late january/early february 2017 [2].
__ANDROID_API__ is not anymore defined in 'android/api-level.h' that is currently included by Include/pyport.h, and is passed instead with -D__ANDROID_API__=$API when compiling. And 'android/api-level.h' is now used to set the API level to 10000 as a Magic version number for a current development build when __ANDROID_API__ is not defined (see attached file).
Adoption of android-ndk-r14 should be made with the following changes:
[1] https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md
[2] https://github.com/android-ndk/ndk/wiki
yan12125 commentedon Dec 22, 2016
Thanks for compiling up necessary changes for NDK r14! Seems that indicates future Python versions will require at least NDK r14 to build?
Another headache from unified headers is that it requires different --sysroot in compilation and linking. Currently setup.py/distutils does not cope with it well. See my dirty hack at [1] for an ad-hoc workaround.
[1] https://github.com/yan12125/python3-android/blob/master/mk/python/distutils-android-sysroot.patch
xdegaye commentedon Dec 22, 2016
Yes.
xdegaye commentedon Nov 23, 2017
New changeset c06c22e by xdegaye in branch 'master':
bpo-29040: Support building Android with Unified Headers (GH-4492)
c06c22e