From 663bb4bd88d65ff37e4da4a614575ac0c96d18b0 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sat, 2 Nov 2013 21:19:24 +0000 Subject: [PATCH 1/2] Replaced 'dicionnary' with 'dictionary' everywhere --- kivy/_event.pyx | 2 +- kivy/core/audio/audio_pygame.py | 2 +- kivy/input/motionevent.py | 8 ++++---- kivy/lang.py | 2 +- kivy/storage/dictstore.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/kivy/_event.pyx b/kivy/_event.pyx index e18c9f2e6..eafcb360c 100644 --- a/kivy/_event.pyx +++ b/kivy/_event.pyx @@ -372,7 +372,7 @@ cdef class EventDispatcher(ObjectWithUid): return self.__properties[name] cpdef dict properties(EventDispatcher self): - '''Return all the properties in that class in a dictionnary of + '''Return all the properties in that class in a dictionary of key/property class. Can be used for introspection. .. versionadded:: 1.0.9 diff --git a/kivy/core/audio/audio_pygame.py b/kivy/core/audio/audio_pygame.py index 35c5ba679..5bbaedc55 100644 --- a/kivy/core/audio/audio_pygame.py +++ b/kivy/core/audio/audio_pygame.py @@ -30,7 +30,7 @@ mixer.set_num_channels(32) class SoundPygame(Sound): # XXX we don't set __slots__ here, to automaticly add - # a dictionnary. We need that to be able to use weakref for + # a dictionary. We need that to be able to use weakref for # SoundPygame object. Otherwise, it failed with: # TypeError: cannot create weak reference to 'SoundPygame' object # We use our clock in play() method. diff --git a/kivy/input/motionevent.py b/kivy/input/motionevent.py index 3554160e2..9ed0b3c71 100644 --- a/kivy/input/motionevent.py +++ b/kivy/input/motionevent.py @@ -89,13 +89,13 @@ from time import time from kivy.vector import Vector -class EnhancedDictionnary(dict): +class EnhancedDictionary(dict): def __getattr__(self, attr): try: return self.__getitem__(attr) except KeyError: - return super(EnhancedDictionnary, self).__getattr__(attr) + return super(EnhancedDictionary, self).__getattr__(attr) def __setattr__(self, attr, value): self.__setitem__(attr, value) @@ -273,9 +273,9 @@ class MotionEvent(MotionEventBase): #: .. versionadded:: 1.7.0 self.triple_tap_time = 0 - #: User data dictionnary. Use this dictionnary to save your own data on + #: User data dictionary. Use this dictionary to save your own data on #: the touch. - self.ud = EnhancedDictionnary() + self.ud = EnhancedDictionary() self.depack(args) diff --git a/kivy/lang.py b/kivy/lang.py index 23a9e24ad..7269111b3 100755 --- a/kivy/lang.py +++ b/kivy/lang.py @@ -1573,7 +1573,7 @@ class BuilderBase(object): if Factory_is_template(cname): # we got a template, so extract all the properties and - # handlers, and push them in a "ctx" dictionnary. + # handlers, and push them in a "ctx" dictionary. ctx = {} idmap = copy(global_idmap) idmap.update({'root': rctx['ids']['root']}) diff --git a/kivy/storage/dictstore.py b/kivy/storage/dictstore.py index d779e1d3c..97cccf407 100644 --- a/kivy/storage/dictstore.py +++ b/kivy/storage/dictstore.py @@ -1,8 +1,8 @@ ''' -Dictionnary store +Dictionary store ================= -Use a Python dictionnary as a store. +Use a Python dictionary as a store. ''' __all__ = ('DictStore', ) From 5fceff4452a154166428f41f5a59d09846aad397 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sat, 2 Nov 2013 22:31:22 +0000 Subject: [PATCH 2/2] Tweaked apk build doc, and added buildozer section --- doc/sources/guide/packaging-android.rst | 72 ++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/doc/sources/guide/packaging-android.rst b/doc/sources/guide/packaging-android.rst index ec66939c1..e9b958474 100644 --- a/doc/sources/guide/packaging-android.rst +++ b/doc/sources/guide/packaging-android.rst @@ -3,18 +3,22 @@ Create a package for Android ============================ + +You can create a package for android using the `python-for-android +`_ project. This page explains how to +download and use it directly on your own machine (see +:ref:`Packaging your application into APK`), use the prebuilt :ref:`testdrive` virtual +machine image, or use the :ref:`buildozer` tool to automate the entire +process. You can also see :ref:`Packaging your application for Kivy Launcher` to run kivy +programs without compiling them. + .. _Packaging your application into APK: -TestDrive ---------- - -There is a VirtualBox Image we provide with the prerequisites along with -the Android SDK and NDK preinstalled to ease your installation woes. You can -download it from `here `_. - Packaging your application into an APK -------------------------------------- +This section describes how to download and use python-for-android directly. + You'll need: - A linux computer or virtual machine @@ -128,6 +132,60 @@ http://developer.android.com/guide/publishing/app-signing.html The release binary will be generated in bin/KivyTouchtracer-1.1.0-release-unsigned.apk (for the previous touchtracer example.) +.. _testdrive: + +TestDrive +--------- + +We provide a VirtualBox Image with python-for-android along with +the Android SDK and NDK preinstalled to ease your installation woes. You can +download it from `here `_. + +Once the VM is loaded, you can follow the instructions from +:ref:`Packaging your application into APK`. You don't need to download +with `git clone` though, as python-for-android is already installed +and set up in the virtual machine home directory. + +.. _Buildozer: + +Buildozer +--------- + +Buildozer is a tool that automates the entire build process. It +downloads and sets up all the prequisites for python-for-android, +including the android SDK and NDK, then builds an apk that can be +automatically pushed to the device. + +Buildozer currently works only in Linux, and is an alpha +release, but it already works well and can significantly simplify the +apk build. + +You can get buildozer at ``_:: + + git clone https://github.com/kivy/buildozer.git + cd buildozer + sudo python2.7 setup.py install + +This will install buildozer in your system. Afterwards, navigate to +your project directory and run:: + + buildozer init + +This creates a `buildozer.spec` file controlling your build +configuration. You should edit it appropriately with your app name +etc. You can set variables to control most or all of the parameters +passed to python-for-android. + +Afterwards, plug in your android device and run:: + + buildozer android debug deploy run + +to build, push and automatically run the apk on your device. + +You can check the buildozer README at +``_ for more documentation of +buildozer's capabilities. + .. _Packaging your application for Kivy Launcher: Packaging your application for the Kivy Launcher