[Mobile-sig] Another, possible way to compile python source code into android .apk

Jacob Kruger jacob at blindza.co.za
Mon Feb 2 21:27:03 CET 2015


While haven't tested this at all - am still trying to track down relatively simple/relevant forms of kivy example source code, etc., it seems to offer a form of online,cloud-compilation engine to generate .apk friles from your kivy/python-for-android source code:
http://android.kivy.org/

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

  ----- Original Message ----- 
  From: Frank, Matthew I 
  To: mobile-sig 
  Sent: Monday, February 02, 2015 8:22 PM
  Subject: [Mobile-sig] Recipe to cross-compile Python 3.4.2 for Android


  I've posted my recipe (including necessary patches) for cross-compiling Python 3.4.2 for Android x86:

   

  https://github.com/wandering-logic/android_x86_python-3.4

   

  This is _not_ an App Framework.  This is the CPython interpreter running from the Android command line.  I originally did this work because I was working on performance analysis tools for Android operating systems developers.

   

  I've only tested on x86 Android (and only on Android KitKat).  I work for Intel, so I have lots of resources for testing on x86, and none for testing on Arm.  Please share any info about your experiences on Arm processors: I'd like to make Python work for all variants of Android.

   

  The patch on the site incorporates "fixes" for the following issues from the Python issue tracker:

   

  20306: Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

  21668: The select and time modules uses libm functions without linking against it

  16353: add function to os module for getting path to default shell

  16255: subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

  22747: Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined

  20305: Android's incomplete locale.h implementation prevents cross-compilation

   

  Plus several other problems that I haven't found reported to bugs.python.org.  (Having to do with problems with Android's support for gethostbyaddr_r() and wcsftime().)

   

  (Note that by "fixes" I mean: I've done enough to get things compiling, linking and running, not necessarily changes that are appropriate to bring back to the Python code-base.)

   

  The state of running the unit tests is:

  328 tests passing.

  22 tests failing.  (test_ctypes, test_threading, test_asyncio, test_bytes, test_capi, test_concurrent_futures, test_datetime, test_distutils, test_faulthandler, test_inspect, test_io, test_mmap, test_multiprocessing_main_handling, test_os, test_posix, test_posixpath, test_pwd, test_shutil, test_socket, test_subprocess, test_sys, test_unicode)

  38 tests skipped.

   

  Enjoy!  (And let me know if anything doesn't work!  (Or if you understand any of the test failures and have ideas about how those failures need to be addressed.))

   

  -Matt



------------------------------------------------------------------------------


  _______________________________________________
  Mobile-sig mailing list
  Mobile-sig at python.org
  https://mail.python.org/mailman/listinfo/mobile-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/mobile-sig/attachments/20150202/57269d42/attachment-0001.html>


More information about the Mobile-sig mailing list