Skip to content

Commit b8b75ea

Browse files
author
dessant
committed
update installation and packaging docs, fix some typos and improve grammar
1 parent 5c6bb3b commit b8b75ea

File tree

3 files changed

+68
-83
lines changed

3 files changed

+68
-83
lines changed

doc/sources/guide/packaging-osx.rst

Lines changed: 37 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,30 @@ for packaging. Otherwise the latest build from kivy.org using Kivy
2424
master will be downloaded and used.
2525

2626
If you want to package for python 3.x.x simply download the package
27-
named Kivy3.7z from the download sectoin of Kivy.org and extract it
28-
to Kivy.app in /Applications.
29-
30-
Then run.
27+
named Kivy3.7z from the download section of kivy.org and extract it
28+
to Kivy.app in /Applications, then run::
3129

3230
buildozer osx debug
3331

34-
Once the app is packaged, you might want to remove extra un needed
35-
packages like gstreamer framework etc from it if you don't use video.
36-
Same logic implies for other things you do not use, just reduce
37-
the package to it's minimal state that is needed for the app to run.
32+
Once the app is packaged, you might want to remove unneeded
33+
packages like gstreamer, if you don't need video support.
34+
Same logic applies for other things you do not use, just reduce
35+
the package to its minimal state that is needed for the app to run.
3836

39-
As a example we are including the showcase example packaged using
40-
this method for both python 2(9.xMB) and 3(15.xMB), you can find the
41-
packages here
37+
As an example we are including the showcase example packaged using
38+
this method for both Python 2 (9.xMB) and 3 (15.xMB), you can find the
39+
packages here:
4240
https://drive.google.com/drive/folders/0B1WO07-OL50_alFzSXJUajBFdnc .
4341

4442
That's it. Enjoy!
4543

46-
buildozer right now uses the Kivy sdk method to package your app.
44+
Buildozer right now uses the Kivy SDK to package your app.
4745
If you want to control more details about your app than buildozer
48-
currently offers then you can use the following method `using Kivy SDK`
49-
mentioned below.
46+
currently offers then you can use the SDK directly, as detailed in the
47+
section below.
5048

51-
Using Kivy SDK
52-
--------------
49+
Using the Kivy SDK
50+
------------------
5351

5452
Since version 1.9.0, Kivy is released for the OS X platform in a
5553
self-contained, portable distribution.
@@ -96,11 +94,11 @@ To install any module you need to install the module like so::
9694

9795
Where are the modules/files installed?
9896
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99-
Inside the relocatable venv within the app at::
97+
Inside the portable venv within the app at::
10098

10199
Kivy.app/Contents/Resources/venv/
102100

103-
If you install a module that install's a binary for example like kivy-garden
101+
If you install a module that installs a binary for example like kivy-garden
104102
That binary will be only available from the venv above, as in after you do::
105103

106104
kivy -m pip install kivy-garden
@@ -112,14 +110,14 @@ The garden lib will be only available when you activate this env.
112110
deactivate
113111

114112
To install binary files
115-
~~~~~~~~~~~~~~~~~~~~~~
113+
~~~~~~~~~~~~~~~~~~~~~~~
116114

117115
Just copy the binary to the Kivy.app/Contents/Resources/venv/bin/ directory.
118116

119-
To Include other frameworks
117+
To include other frameworks
120118
~~~~~~~~~~~~~~~~~~~~~~~~~~~
121119
Kivy.app comes with SDL2 and Gstreamer frameworks provided.
122-
To Include frameworks other than the ones provided do the following::
120+
To include frameworks other than the ones provided do the following::
123121

124122
git clone http://github.com/tito/osxrelocator
125123
export PYTHONPATH=~/path/to/osxrelocator
@@ -130,12 +128,12 @@ To Include frameworks other than the ones provided do the following::
130128
Do not forget to replace <Framework_name> with your framework.
131129
This tool `osxrelocator` essentially changes the path for the
132130
libs in the framework such that they are relative to the executable
133-
within the .app. Making the Framework relocatable with the .app.
131+
within the .app, making the Framework portable with the .app.
134132

135133

136134
Shrinking the app size
137135
^^^^^^^^^^^^^^^^^^^^^^
138-
The app has of considerable size right now, however the unneeded parts can be
136+
The app has a considerable size right now, however the unneeded parts can be
139137
removed from the package.
140138

141139
For example if you don't use GStreamer, simply remove it from
@@ -165,26 +163,26 @@ This should give you a compressed dmg that will further shrink the size of your
165163
.. _osx_pyinstaller:
166164

167165

168-
Using Pyinstaller without brew
169-
------------------------------
170-
First install Kivy and it's dependencies without using homebrew as mentioned here
171-
http://kivy.org/docs/installation/installation.html#development-version
166+
Using PyInstaller without Homebrew
167+
----------------------------------
168+
First install Kivy and its dependencies without using Homebrew as mentioned here
169+
http://kivy.org/docs/installation/installation.html#development-version.
172170

173-
Once you have kivy and it's deps installed then you need to install pyinstaller
171+
Once you have kivy and its deps installed, you need to install PyInstaller.
174172

175-
let's assume we use a folder like `testpackaging`::
173+
Let's assume we use a folder like `testpackaging`::
176174

177175
cd testpackaging
178176
git clone http://github.com/pyinstaller/pyinstaller
179-
180-
create a file named as touchtracer.spec in this directory and paste the following
181-
into it editing ::
177+
178+
Create a file named touchtracer.spec in this directory and add the following
179+
code to it::
182180

183181
# -*- mode: python -*-
184-
182+
185183
block_cipher = None
186184
from kivy.tools.packaging.pyinstaller_hooks import get_deps_all, hookspath, runtime_hooks
187-
185+
188186
a = Analysis(['/path/to/yout/folder/containing/examples/demo/touchtracer/main.py'],
189187
pathex=['/path/to/yout/folder/containing/testpackaging'],
190188
binaries=None,
@@ -217,22 +215,22 @@ into it editing ::
217215
icon=None,
218216
bundle_identifier=None)
219217

220-
Change the paths ::
218+
Change the paths with your relevant paths::
221219

222220
a = Analysis(['/path/to/yout/folder/containing/examples/demo/touchtracer/main.py'],
223221
pathex=['/path/to/yout/folder/containing/testpackaging'],
224222
...
225223
...
226224
coll = COLLECT(exe, Tree('../kivy/examples/demo/touchtracer/'),
227225

228-
By your relevant paths, then run the following command::
226+
Then run the following command::
229227

230228
pyinstaller/pyinstaller.py touchtracer.spec
231229

232230
Replace `touchtracer` with your app where appropriate.
233-
This will give you a <yourapp>.app in dist/ folder.
234-
235-
231+
This will give you a <yourapp>.app in the dist/ folder.
232+
233+
236234
Using PyInstaller and Homebrew
237235
------------------------------
238236
.. note::
@@ -344,16 +342,3 @@ If your project depends on GStreamer::
344342
If you are using Python from Homebrew you currently also need the following step until `this pull request <https://github.com/Homebrew/homebrew/pull/46097>`_ gets merged::
345343

346344
$ brew reinstall --with-python --build-bottle https://github.com/cbenhagen/homebrew/raw/patch-3/Library/Formula/gst-python.rb
347-
348-
349-
SDL 2 HEAD for ``Window.on_dropfile`` support
350-
"""""""""""""""""""""""""""""""""""""""""""""
351-
352-
You can install the newest SDL 2 library which supports ``on_dropfile`` with::
353-
354-
$ brew reinstall --build-bottle --HEAD sdl2
355-
356-
Or you build 2.0.3 with the following patches (untested):
357-
358-
- https://hg.libsdl.org/SDL/rev/2cc90bb31777
359-
- https://hg.libsdl.org/SDL/rev/63c4d6f1f85f

doc/sources/installation/installation-osx.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,39 @@ It comes as a .7z file that contains:
2222
To install Kivy, you must:
2323

2424
1. Download the latest version from http://kivy.org/#download
25-
Kivy2.7z is using using python2(System Python), Kivy3.7z(Python3)
26-
2. Extract it using a Unarchiver programme like http://www.kekaosx.com/en/.
25+
Kivy2.7z is using using Python 2 (System Python), Kivy3.7z (Python 3)
26+
2. Extract it using an archive program like http://www.kekaosx.com/en/.
2727
3. Copy the Kivy2.app or Kivy3.app as Kivy.app to /Applications.
28-
Paste the following line onto the terminal::
29-
28+
Paste the following line in the terminal::
29+
3030
$ sudo mv Kivy2.app /Applications/Kivy.app
31-
31+
3232
4. Create a symlink named `kivy` to easily launch apps with kivy venv::
33-
33+
3434
$ ln -s /Applications/Kivy.app/Contents/Resources/script /usr/local/bin/kivy
35-
36-
5. Examples and all the normal kivy tools are present in the Kivy.app/Contents/Resources/kivy dir
3735

38-
You should now have a `kivy` script that you can use to launch your kivy app from terminal.
36+
5. Examples and all the normal kivy tools are present in the Kivy.app/Contents/Resources/kivy directory.
37+
38+
You should now have a `kivy` script that you can use to launch your kivy app from the terminal.
3939

4040
You can just drag and drop your main.py to run your app too.
4141

4242

4343
Installing modules
4444
~~~~~~~~~~~~~~~~~~
4545

46-
Kivy package on osx uses its own virtual env that is activated when you run your app using `kivy` command.
46+
The Kivy SDK on OS X uses its own virtual env that is activated when you run your app using the `kivy` command.
4747
To install any module you need to install the module like so::
4848

4949
$ kivy -m pip install <modulename>
5050

5151
Where are the modules/files installed?
5252
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53-
Inside the relocatable venv within the app at::
53+
Inside the portable venv within the app at::
5454

5555
Kivy.app/Contents/Resources/venv/
5656

57-
If you install a module that install's a binary for example like kivy-garden
57+
If you install a module that installs a binary for example like kivy-garden.
5858
That binary will be only available from the venv above, as in after you do::
5959

6060
kivy -m pip install kivy-garden
@@ -70,10 +70,10 @@ To install binary files
7070

7171
Just copy the binary to the /Applications/Kivy.app/Contents/Resources/venv/bin/ directory.
7272

73-
To Include other frameworks
73+
To include other frameworks
7474
~~~~~~~~~~~~~~~~~~~~~~~~~~~
7575
Kivy.app comes with SDL2 and Gstreamer frameworks provided.
76-
To Include frameworks other than the ones provided do the following::
76+
To include frameworks other than the ones provided do the following::
7777

7878
git clone http://github.com/tito/osxrelocator
7979
export PYTHONPATH=~/path/to/osxrelocator
@@ -84,7 +84,7 @@ To Include frameworks other than the ones provided do the following::
8484
Do not forget to replace <Framework_name> with your framework.
8585
This tool `osxrelocator` essentially changes the path for the
8686
libs in the framework such that they are relative to the executable
87-
within the .app. Making the Framework relocatable with the .app.
87+
within the .app, making the Framework portable with the .app.
8888

8989
Start any Kivy Application
9090
~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/sources/installation/installation.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Installation
55

66
We try not to reinvent the wheel, but to bring something innovative to the
77
market. As a consequence, we're focused on our own code and use pre-existing,
8-
high-quality third-party libraries where possible.
8+
high quality third-party libraries where possible.
99
To support the full, rich set of features that Kivy offers, several other libraries are
1010
required. If you do not use a specific feature (e.g. video playback), you
1111
don't need the corresponding dependency.
@@ -26,7 +26,7 @@ be available. For these, we recommend `SDL2 <https://www.libsdl.org/download-2.0
2626
Other optional libraries (mutually independent) are:
2727

2828
* `OpenCV 2.0 <http://sourceforge.net/projects/opencvlibrary/>`_ -- Camera input.
29-
* `PIL <http://www.pythonware.com/products/pil/index.htm>`_ -- Image and text display.
29+
* `Pillow <https://python-pillow.github.io/>`_ -- Image and text display.
3030
* `PyEnchant <https://pythonhosted.org/pyenchant/>`_ -- Spelling correction.
3131

3232

@@ -101,8 +101,8 @@ supported version from pypi:
101101
OS X
102102
++++
103103

104-
Without using brew you can install the dependencies for kivy
105-
manually copy pasting the following commands onto a terminal::
104+
Without using brew you can install the dependencies for kivy by
105+
manually pasting the following commands in a terminal::
106106

107107
curl -O -L https://www.libsdl.org/tmp/release/SDL2-2.0.4.dmg
108108
curl -O -L https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.dmg
@@ -113,8 +113,8 @@ manually copy pasting the following commands onto a terminal::
113113
hdiutil attach SDL2-2.0.4.dmg
114114
sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/
115115

116-
This should ask you for you for your root password, provide it and then copy paste
117-
the following lines onto your terminal::
116+
This should ask you for your root password, provide it and then paste
117+
the following lines in your terminal::
118118

119119
hdiutil attach SDL2_image-2.0.0.dmg
120120
sudo cp -a /Volumes/SDL2_image/SDL2_image.framework /Library/Frameworks/
@@ -127,15 +127,15 @@ the following lines onto your terminal::
127127
pip install --upgrade --user cython pillow
128128

129129
Now that you have all the dependencies for kivy, you need to make sure
130-
you have command line tools installed::
130+
you have the command line tools installed::
131131

132132
xcode-select --install
133133

134-
Goto a apropriate dir like::
134+
Go to an apropriate dir like::
135135

136136
mkdir ~/code
137137
cd ~/code
138-
138+
139139
You can now install kivy itself::
140140

141141
git clone http://github.com/kivy/kivy
@@ -147,19 +147,19 @@ just point your PYTHONPATH to this dir.
147147

148148
export PYTHONPATH=~/code/kivy:$PYTHONPATH
149149

150-
To check if kivy is installed type the following command in your
150+
To check if kivy is installed, type the following command in your
151151
terminal::
152152

153153
python -c "import kivy"
154154

155-
It should give you the a output something like the following::
155+
It should give you an output similar to the following::
156156

157157
$ python -c "import kivy"
158158
[INFO ] [Logger ] Record log in /Users/quanon/.kivy/logs/kivy_15-12-31_21.txt
159159
[INFO ] [Screen ] Apply screen settings for Motolora Droid 2
160160
[INFO ] [Screen ] size=480x854 dpi=240 density=1.5 orientation=portrait
161161
[INFO ] [Kivy ] v1.9.1-stable
162-
[INFO ] [Python ] v2.7.10 (default, Oct 23 2015, 18:05:06)
162+
[INFO ] [Python ] v2.7.10 (default, Oct 23 2015, 18:05:06)
163163
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
164164

165165
If using brew method to install kivy then
@@ -215,16 +215,16 @@ also run (as admin, e.g. with sudo)::
215215
$ python setup.py install
216216

217217
If you want to contribute code (patches, new features) to the Kivy
218-
code base, please read :ref:`contributing`.
218+
codebase, please read :ref:`contributing`.
219219

220220
Running the test suite
221221
~~~~~~~~~~~~~~~~~~~~~~
222222

223223
To help detect issues and behaviour changes in Kivy, a set of unittests are
224224
provided. A good thing to do is to run them just after your Kivy installation, and
225225
every time you intend to push a change. If you think something was broken
226-
in Kivy, perhaps a test will show this? If not, it might be a good time to write
227-
one .)
226+
in Kivy, perhaps a test will show this. (If not, it might be a good time to write
227+
one.)
228228

229229
Kivy tests are based on nosetest, which you can install from your package
230230
manager or using pip::
@@ -239,7 +239,7 @@ Uninstalling Kivy
239239
~~~~~~~~~~~~~~~~~
240240

241241
If you are mixing multiple Kivy installations, you might be confused about where each Kivy version is
242-
located. Please note that you might need to follow these steps multiple times if you have multiple
242+
located. Please note that you might need to follow these steps multiple times if you have multiple
243243
Kivy versions installed in the Python library path.
244244
To find your current installed version, you can use the command line::
245245

0 commit comments

Comments
 (0)