Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python on the move: The state of Mobile Python

Python on the move: The state of Mobile Python

Over the last 5 years, the "desktop/server" split that dominated the 80s, 90s and 2000s has been joined by a third player - mobile devices such as phones and tablets.

So, what is the story for running Python on these devices? Although there hasn't been much to say in the past, the good news is that over the last year, there's been some signficant changes in the landscape, and Python on Mobile is now teetering on the brink of being a genuine reality.

In this talk, Russell Keith-Magee will survey the current state of using Python on mobile devices, the work that is currently being done, areas where more work is requried, and the prospects for the future.

B91373320dbc3bc52fcd870d3b21748f?s=128

Russell Keith-Magee

August 02, 2015
Tweet

Transcript

  1. Python on the move The state of mobile Python Dr

    Russell Keith-Magee PyCon AU 2015
  2. Python on the move The state of mobile Python Dr

    Russell Keith-Magee PyCon AU 2015
  3. None
  4. None
  5. None
  6. None
  7. toga

  8. None
  9. What is "Mobile Python"?

  10. Mobile devices don't have TTYs

  11. Functionality delivered as apps, not common services

  12. My position: “Mobile Python” means “Embedded only” Python

  13. My position: “Mobile Python” means “Embedded only” Python

  14. Python means cross platform

  15. iOS and Android

  16. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  17. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  18. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  19. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  20. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  21. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  22. iOS Hardware: ARMv6, ARMv7, ARMv7s, ARM64 Testing on i386/x86-64 Simulator

    Clang toolchain Fat binaries Objective-C native libraries No dynamic linking Submission through App Store
  23. Jailbreaking

  24. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  25. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  26. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  27. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  28. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  29. Android Hardware: ARM, ARM64, i386, MIPS Testing via device emulator

    Java toolchain Native code via JNI Single target binaries Submission through Google Play Store
  30. So can I Python my phone?

  31. iOS Patch available for CPython 3.4.2 Python issue23670 On OS/X

    with XCode: cd iOS && make spits out Python.framework Fully passes test suite on Simulator many capabilities disabled 5 failing tests on ARM64 devices 3 failing tests on ARMv7/ARMv7S devices
  32. iOS Patch available for CPython 3.4.2 Python issue23670 On OS/X

    with XCode: cd iOS && make spits out Python.framework Fully passes test suite on Simulator many capabilities disabled 5 failing tests on ARM64 devices 3 failing tests on ARMv7/ARMv7S devices
  33. iOS Patch available for CPython 3.4.2 Python issue23670 On OS/X

    with XCode: cd iOS && make spits out Python.framework Fully passes test suite on Simulator many capabilities disabled 5 failing tests on ARM64 devices 3 failing tests on ARMv7/ARMv7S devices
  34. iOS Patch available for CPython 3.4.2 Python issue23670 On OS/X

    with XCode: cd iOS && make spits out Python.framework Fully passes test suite on Simulator many capabilities disabled 5 failing tests on ARM64 devices 3 failing tests on ARMv7/ARMv7S devices
  35. iOS Patch available for CPython 3.4.2 Python issue23670 On OS/X

    with XCode: cd iOS && make spits out Python.framework Fully passes test suite on Simulator many capabilities disabled 5 failing tests on ARM64 devices 9 failing tests on ARMv7/ARMv7S devices
  36. iOS - problems to solve Python issue22625 - cross-platform build

    support libffi Shepherding the commit
  37. iOS - problems to solve Python issue22625 - cross-platform build

    support libffi Shepherding the commit
  38. iOS - problems to solve Python issue22625 - cross-platform build

    support libffi Shepherding the commit
  39. iOS - problems to solve Python issue22625 - cross-platform build

    support libffi Shepherding the commit
  40. Android Patch available for CPython 3.4.2 Python issue23496 Not yet

    complete Kivy has a working 2.7.6 compile, so it can be done.
  41. Android - problems to solve Python issue22625 - cross-platform build

    support libffi CPython vs Java Why not Jython?
  42. Why not Jython?

  43. Why not Jython?

  44. Why not Jython?

  45. Why not Jython?

  46. Something else?

  47. Something else?

  48. Byterun https://github.com/nedbat/byterun

  49. My yaks contain multitudes

  50. But wait...

  51. Bridges: iOS PyObjC Rubicon Objective C PyObjus

  52. Bridges: iOS PyObjC Rubicon Objective C PyObjus

  53. Bridges: iOS PyObjC Rubicon Objective-C PyObjus

  54. Bridges: Android CPython Rubicon Java PyJNIus Jython clamp

  55. Widgets

  56. 1. Go native

  57. 2. Kivy

  58. 2. Kivy

  59. 2. Kivy

  60. 2. Kivy

  61. 2. Kivy

  62. 2. Kivy

  63. 2. Kivy

  64. 3. Toga

  65. Making it easy.

  66. Making an iOS project cookiecutter http://github.com/pybee/Python- iOS-template Download support tarball

    from http://github.com/Python-iOS-support Unpack tarball Compile and run
  67. Making an Android project cookiecutter http://github.com/pybee/Python- Android-template Download support tarball

    from http://github.com/Python-Android-support Unpack tarball Compile and run
  68. Option 1a pip install briefcase python setup.py ios python setup.py

    android
  69. python setup.py osx

  70. The future

  71. The future

  72. The threat

  73. The threat

  74. The opportunity

  75. The opportunity

  76. The potential and the potential audience for a Mobile Python

    is huge.
  77. Python Mobile-SIG russell@keith-magee.com @freakboy3742 pybee.org @PyBeeWare