Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-03 Thread Shiz
idelines/principles as close as possible. Adding android_version() to the platform module it is, then. hasattr(platform, 'android_version') is probably an easy enough check for Python users. Kind regards, Shiz -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin)

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-03 Thread Shiz
bi', even though it still seems a bit fragile. Please ignore MACHDEP/PLATDIR, those are set as a result of me fiddling with sys.platform. Kind regards, Shiz -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: Using GnuPG with Mozilla - http:

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-02 Thread Shiz
mselves? It seems like a fair thing to do if CPython would support Android as an official target. Kind regards, Shiz -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQQcBAEBCgAGBQJT3cYHAAoJEICfd9ZVux

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-02 Thread Shiz
It *is* fragile code, it seems better if applications could 'just rely' on Python to figure it out, since it's not a trivial check. Kind regards, Shiz [1]: http://bugs.python.org/issue1322#msg207427 -BEGIN PGP SIGNATURE- Version: GnuPG/M

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-02 Thread Shiz
t now). I'd also like to note that I wouldn't agree with following too many of Kivy/Py4A/SL4A's design decisions on this, as they seem mostly absent. - From what I've read, their patches mostly seem geared towards getting Python to run on Android, not necessarily integrating it we

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-02 Thread Shiz
g on a Linux platform, which I believe to be correct in a lot of places, and Python modules to use a solid value to check if they need to behave differently when running on Android. On a sidenote, Kivy and SL4A/Py4A do not address this, no. From what I've seen from their patches they are mostly the

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-01 Thread Shiz
versions. I'd dare say that the vast, vast majority of Android devices out there are running on the same base, namely AOSP[4] with numerous vendor fixes/drivers/additions, and that custom Android distributions would try not to break NDK compatibility. Kind regards, Shiz [1]: https://git

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-01 Thread Shiz
can be. Oh, no, nothing like that. It’s just that I’m not sure, as goes for anything, that it would be accepted into mainline CPython. Better safe than sorry in that aspect: maybe the maintainers don’t want to support Android in the first place. :) Kind regards, Shiz signature.

Re: [Python-Dev] Exposing the Android platform existence to Python modules

2014-08-01 Thread Shiz
ly wrestling with Bionic, Android’s libc, but putting that into perspective to consider Android as a whole (after all, the SDK and NDK are what make Android for a lot of developers) might be a valid other approach as well. Kinds regards, Shiz signature.asc Description: Message signed with OpenPGP using

[Python-Dev] Exposing the Android platform existence to Python modules

2014-07-31 Thread Shiz
distribution. This way, code could trivially check if it ran on the GNU(+associates) userland, or under a BSD-ish userland, or Android… and adjust its behaviour accordingly. I would be delighted to hear comments on this proposal, or better yet, alternative solutions. :) Kind regards, Shiz P.S