When cross-compiling the only useful information printed by pythoninfo is the cross-built sysconfig data since everything else is related to the native python process used during the cross-build. Currently pythoninfo prints the native sysconfig data instead.
I'm not sure of the purpose of this change. You can please elaborate on you use case? You use cross-compilation, ok. But why do you want to run test.pythoninfo on the computer building Python, rather than the computer running tests? The purpose of test.pythoninfo is to dump informations on tests run by "./python -m test". I wrote it for buildbots. If your use case is to have an Android buildbot worker, test.pythoninfo would be run on Android, no?
"make pythoninfo" is an alias for ./python -m test.pythoninfo. I added to support Python compiled in shared mode (./configure --enable-shared) and macOS which requires ./python.exe. Obviously, for a specific buildbot or specific script, you are free to run directly ./python -m test.pythoninfo, rather than running "make pythoninfo" ;-)
I may have misunderstood the scope of pythoninfo. On Android the readline or sqlite versions are known at build time since they have to be built at that time, but much more useful information can be obtained (or will be obtained) from python running on the device or the emulator. For the NDK and SDK versions (issue 32210), these can be printed by the 'all' target for the NDK and by one of the emulator targets for the SDK. This means that both this issue and #32210 may be closed as wont fix.