|
| 1 | +python-for-android |
| 2 | +================== |
| 3 | + |
| 4 | +python-for-android is a packager for Python apps on Android. You can |
| 5 | +create your own Python distribution including the modules and |
| 6 | +dependencies you want, and bundle it in an APK along with your own code. |
| 7 | + |
| 8 | +Features include: |
| 9 | + |
| 10 | +- Support for building with both Python 2 and Python 3. |
| 11 | +- Different app backends including Kivy, PySDL2, and a WebView with |
| 12 | + Python webserver. |
| 13 | +- Automatic support for most pure Python modules, and built in support |
| 14 | + for many others, including popular dependencies such as numpy and |
| 15 | + sqlalchemy. |
| 16 | +- Multiple architecture targets, for APKs optimised on any given |
| 17 | + device. |
| 18 | + |
| 19 | +For documentation and support, see: |
| 20 | + |
| 21 | +- Website: http://python-for-android.readthedocs.io |
| 22 | +- Mailing list: https://groups.google.com/forum/#!forum/kivy-users or |
| 23 | + https://groups.google.com/forum/#!forum/python-android. |
| 24 | + |
| 25 | +In 2015 these tools were rewritten to provide a new, easier to use and |
| 26 | +extend interface. If you are looking for the old toolchain with |
| 27 | +distribute.sh and build.py, it is still available at |
| 28 | +https://github.com/kivy/python-for-android/tree/old\_toolchain, and |
| 29 | +issues and PRs relating to this branch are still accepted. However, the |
| 30 | +new toolchain contains all the same functionality via the built in |
| 31 | +pygame bootstrap. |
| 32 | + |
| 33 | +Documentation |
| 34 | +============= |
| 35 | + |
| 36 | +Follow the `quickstart |
| 37 | +instructions <https://python-for-android.readthedocs.org/en/latest/quickstart/>`__ |
| 38 | +to install and begin creating APKs. |
| 39 | + |
| 40 | +Quick instructions to start would be:: |
| 41 | + |
| 42 | + pip install python-for-android |
| 43 | + |
| 44 | +or to test the master branch:: |
| 45 | + |
| 46 | + pip install git+https://github.com/kivy/python-for-android.git |
| 47 | + |
| 48 | +The executable is called ``python-for-android`` or ``p4a`` (both are |
| 49 | +equivalent). To test that the installation worked, try:: |
| 50 | + |
| 51 | + python-for-android recipes |
| 52 | + |
| 53 | +This should return a list of recipes available to be built. |
| 54 | + |
| 55 | +To build any distributions, you need to set up the Android SDK and NDK |
| 56 | +as described in the documentation linked above. |
| 57 | + |
| 58 | +If you did this, to build an APK with SDL2 you can try e.g.:: |
| 59 | + |
| 60 | + p4a apk --requirements=kivy --private /home/asandy/devel/planewave_frozen/ --package=net.inclem.planewavessdl2 --name="planewavessdl2" --version=0.5 --bootstrap=sdl2 |
| 61 | + |
| 62 | +For full instructions and parameter options, see `the |
| 63 | +documentation <https://python-for-android.readthedocs.io/en/latest/quickstart/#usage>`__. |
| 64 | + |
| 65 | +Support |
| 66 | +======= |
| 67 | + |
| 68 | +If you need assistance, you can ask for help on our mailing list: |
| 69 | + |
| 70 | +- User Group: https://groups.google.com/group/kivy-users |
| 71 | + |
| 72 | + |
| 73 | +We also have an IRC channel: |
| 74 | + |
| 75 | +- Server: irc.freenode.net |
| 76 | +- Port: 6667, 6697 (SSL only) |
| 77 | +- Channel: #kivy |
| 78 | + |
| 79 | +Contributing |
| 80 | +============ |
| 81 | + |
| 82 | +We love pull requests and discussing novel ideas. Check out our |
| 83 | +`contribution guide <http://kivy.org/docs/contribute.html>`__ and feel |
| 84 | +free to improve python-for-android. |
| 85 | + |
| 86 | +The following mailing list and IRC channel are used exclusively for |
| 87 | +discussions about developing the Kivy framework and its sister projects: |
| 88 | + |
| 89 | +- Dev Group: https://groups.google.com/group/kivy-dev |
| 90 | + |
| 91 | + |
| 92 | +IRC channel: |
| 93 | + |
| 94 | +- Server: irc.freenode.net |
| 95 | +- Port: 6667, 6697 (SSL only) |
| 96 | +- Channel: #kivy or #kivy-dev |
| 97 | + |
| 98 | +License |
| 99 | +======= |
| 100 | + |
| 101 | +python-for-android is released under the terms of the MIT License. |
| 102 | +Please refer to the LICENSE file. |
0 commit comments