bpo-32637: Set sys.platform to "android" on Android#5288
bpo-32637: Set sys.platform to "android" on Android#5288vstinner wants to merge 2 commits intopython:masterfrom vstinner:ifdef_android_platform
Conversation
|
I abandoned my previous attempt to modify MACHDEP in configure: PR #5287. |
|
Great, it works on arm7. And anyway MACHDEP won't help for loading android abi flavor of modules. |
Note: While checking how MACHDEP is used, I found deadcode. I proposed a PR to remove it: PR #5289. I don't know well the "multiarch" thing and I'm not confortable with autotools, so I chose to write this minimalist and self-contained change which only impacts sys.platform. |
|
good effects, now instead of tring to load |
|
Most likely at least MACHDEP should be modified, too. In my build tree, there's Line 78 in 58dc03c Note that this is tested with my building scripts at https://github.com/yan12125/python3-android/ using NDK r16b, not xdegaye's scripts. I tested ARM64, android-21 API on my ASUS ZE500KL phone. |
|
@yan12125 i suggest to build sysconfigdata_m_android.py from a template as most of collected data in that file is only efficient for pip and setuptools when referencing a native compiler. If you look at the generated_sysconfigdata_m_linux_.py when cross compiled : it is full of reference to $HOST not $TARGET. |
https://bugs.python.org/issue32637