Skip to content

Commit fe16e3e

Browse files
authored
Modify docs (#1922)
* Add sphinxawesome_theme dependency for docs * Update configuration for docs * upload images for logo and banner * Basic modifications for current theme * Update conf.py * Update test_python.yml
1 parent d8c3498 commit fe16e3e

File tree

12 files changed

+159
-86
lines changed

12 files changed

+159
-86
lines changed

.github/workflows/test_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
steps:
6969
- uses: actions/checkout@v5
7070
- name: Requirements
71-
run: pip install --upgrade sphinx
71+
run: pip install -U sphinx sphinxawesome_theme
7272
- name: Check links
7373
run: sphinx-build -b linkcheck docs/source docs/build
7474
- name: Generate documentation

docs/source/_static/images/banner.svg

Lines changed: 1 addition & 0 deletions
Loading
15.3 KB
Loading
6.32 KB
Loading

docs/source/conf.py

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import os
1515
import re
1616

17+
from sphinxawesome_theme.postprocess import Icons
18+
1719
# If extensions (or modules to document with autodoc) are in another directory,
1820
# add these directories to sys.path here. If the directory is relative to the
1921
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -42,7 +44,7 @@
4244

4345
# General information about the project.
4446
project = u'Buildozer'
45-
copyright = u'2014-2023, Kivy Team and other contributors'
47+
copyright = u'2014-2025, Kivy Team and other contributors'
4648

4749
# The version info for the project you're documenting, acts as replacement for
4850
# |version| and |release|, also used in various other places throughout the
@@ -97,6 +99,7 @@ def get_version():
9799

98100
# The name of the Pygments (syntax highlighting) style to use.
99101
pygments_style = 'sphinx'
102+
pygments_style_dark = 'dracula'
100103

101104
# A list of ignored prefixes for module index sorting.
102105
#modindex_common_prefix = []
@@ -109,12 +112,49 @@ def get_version():
109112

110113
# The theme to use for HTML and HTML Help pages. See the documentation for
111114
# a list of builtin themes.
112-
html_theme = 'default'
115+
html_theme = 'sphinxawesome_theme'
116+
117+
# Customized permalinks icon
118+
html_permalinks_icon = Icons.permalinks_icon
113119

114120
# Theme options are theme-specific and customize the look and feel of a theme
115121
# further. For a list of options available for each theme, see the
116122
# documentation.
117-
#html_theme_options = {}
123+
html_theme_options = {
124+
"logo_light": "_static/images/logo.png",
125+
"logo_dark": "_static/images/logo_dark.png",
126+
"awesome_external_links": True,
127+
"show_prev_next": True,
128+
"extra_header_link_icons": {
129+
"GitHub": {
130+
"link": "https://github.com/Kivy/Buildozer",
131+
"icon": (
132+
'<svg height="26px" style="margin-top:-2px;display:inline" '
133+
'viewBox="0 0 45 44" '
134+
'fill="currentColor" xmlns="http://www.w3.org/2000/svg">'
135+
'<path fill-rule="evenodd" clip-rule="evenodd" '
136+
'd="M22.477.927C10.485.927.76 10.65.76 22.647c0 9.596 6.223 17.736 '
137+
"14.853 20.608 1.087.2 1.483-.47 1.483-1.047 "
138+
"0-.516-.019-1.881-.03-3.693-6.04 "
139+
"1.312-7.315-2.912-7.315-2.912-.988-2.51-2.412-3.178-2.412-3.178-1.972-1.346.149-1.32.149-1.32 " # noqa
140+
"2.18.154 3.327 2.24 3.327 2.24 1.937 3.318 5.084 2.36 6.321 "
141+
"1.803.197-1.403.759-2.36 "
142+
"1.379-2.903-4.823-.548-9.894-2.412-9.894-10.734 "
143+
"0-2.37.847-4.31 2.236-5.828-.224-.55-.969-2.759.214-5.748 0 0 "
144+
"1.822-.584 5.972 2.226 "
145+
"1.732-.482 3.59-.722 5.437-.732 1.845.01 3.703.25 5.437.732 "
146+
"4.147-2.81 5.967-2.226 "
147+
"5.967-2.226 1.185 2.99.44 5.198.217 5.748 1.392 1.517 2.232 3.457 "
148+
"2.232 5.828 0 "
149+
"8.344-5.078 10.18-9.916 10.717.779.67 1.474 1.996 1.474 4.021 0 "
150+
"2.904-.027 5.247-.027 "
151+
"5.96 0 .58.392 1.256 1.493 1.044C37.981 40.375 44.2 32.24 44.2 "
152+
'22.647c0-11.996-9.726-21.72-21.722-21.72" '
153+
'fill="currentColor"/></svg>'
154+
),
155+
},
156+
},
157+
}
118158

119159
# Add any paths that contain custom themes here, relative to this directory.
120160
#html_theme_path = []
@@ -133,12 +173,12 @@ def get_version():
133173
# The name of an image file (within the static path) to use as favicon of the
134174
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
135175
# pixels large.
136-
#html_favicon = None
176+
html_favicon = "_static/images/logo.png"
137177

138178
# Add any paths that contain custom static files (such as style sheets) here,
139179
# relative to this directory. They are copied after the builtin static files,
140180
# so a file named "default.css" will overwrite the builtin "default.css".
141-
# html_static_path = ['_static']
181+
html_static_path = ['_static']
142182

143183
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
144184
# using the given strftime format.

docs/source/faq.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _faq:
2+
13
FAQ
24
===
35

docs/source/index.rst

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
.. _introduction:
2+
13
Welcome to Buildozer's documentation!
24
=====================================
35

6+
.. rst-class:: lead
7+
8+
Generic Python packager for Android and iOS.
9+
10+
Overview
11+
--------
12+
13+
.. figure:: /_static/images/banner.svg
14+
:alt: Buildozer
15+
:height: 300px
16+
:align: center
17+
418
Buildozer is a development tool for turning Python
519
applications into binary packages ready for installation on any of a number of
620
platforms, including mobile devices. It automates the entire build process.
721

8-
The app developer provides a single "buildozer.spec" file, which describes the
22+
The app developer provides a single :class:`buildozer.spec` file, which describes the
923
application's requirements and settings, such as title and icons. Buildozer can
1024
then create installable packages for Android, iOS, Windows, macOS and/or Linux.
1125

@@ -14,16 +28,16 @@ building apps using the `Kivy framework <https://kivy.org/doc/stable/>`_ easier,
1428
but it can be used independently - even with other GUI frameworks.
1529

1630
.. note::
17-
python-for-android only runs on Linux or macOS. (On Windows, a Linux emulator is
31+
python-for-android toolchain only runs on Linux or macOS. (On Windows, a Linux emulator is
1832
required.)
1933

20-
Kivy for iOS only runs on macOS.
34+
kivy-ios toolchain only runs on macOS.
2135

2236
Buildozer is managed by the `Kivy Team <https://kivy.org/about.html>`_. It relies
2337
on its sibling projects:
24-
`python-for-android <https://python-for-android.readthedocs.io/en/latest/>`_ for
38+
`python-for-android toolchain <https://python-for-android.readthedocs.io/en/latest/>`_ for
2539
Android packaging, and
26-
`Kivy for iOS <https://github.com/kivy/kivy-ios/>`_ for iOS packaging.
40+
`kivy-ios toolchain <https://github.com/kivy/kivy-ios/>`_ for iOS packaging.
2741

2842
Buildozer is released and distributed under the terms of the MIT license. You should have received a
2943
copy of the MIT license alongside your distribution. Our
@@ -32,10 +46,16 @@ is also available.
3246

3347

3448
.. note::
35-
This tool is unrelated to the online build service, `buildozer.io`.
49+
This tool is has no relation to the online build service, `buildozer.io`.
50+
51+
52+
.. toctree::
53+
:hidden:
54+
55+
Introduction <self>
3656

3757
.. toctree::
38-
:maxdepth: 2
58+
:hidden:
3959

4060
installation
4161
quickstart

docs/source/installation.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _installation:
2+
13
Installation
24
============
35

@@ -91,7 +93,7 @@ you can install just the platform tools which also contain ADB.
9193
- Visit the `Android SDK Platform Tools <https://developer.android.com/tools/releases/platform-tools>`_ page, and
9294
select "Download SDK Platform-Tools for Windows".
9395

94-
- Unzip the downloaded file to a new folder. For example, `C:\\platform-tools\\`
96+
- Unzip the downloaded file to a new folder. For example, :class:`C:\\platform-tools\\`
9597

9698

9799
Install on macOS

docs/source/quickstart.rst

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1+
.. _quickstart:
2+
13
Quickstart
24
==========
35

4-
Let's get started with Buildozer!
6+
.. rst-class:: lead
7+
8+
Let's get started with Buildozer!
59

610
Init and build for Android
711
--------------------------
812

913
#. Buildozer will try to guess the version of your application, by searching a
10-
line like `__version__ = "1.0.3"` in your `main.py`. Ensure you have one at
14+
line like :class:`__version__ = "1.0.3"` in your :class:`main.py`. Ensure you have one at
1115
the start of your application. It is not mandatory but heavily advised.
1216

13-
#. Create a `buildozer.spec` file, with::
17+
#. Create a :class:`buildozer.spec` file, with::
1418

1519
buildozer init
1620

17-
#. Edit the `buildozer.spec` according to the :ref:`specifications`. You should
18-
at least change the `title`, `package.name` and `package.domain` in the
19-
`[app]` section.
21+
#. Edit the :class:`buildozer.spec` according to the :ref:`specifications`. You should
22+
at least change the :class:`title`, :class:`package.name` and :class:`package.domain` in the
23+
:class:`[app]` section.
2024

2125
#. Start an Android/debug build with::
2226

@@ -28,7 +32,7 @@ Init and build for Android
2832
Don't worry, those files will be saved in a global directory and will be
2933
shared across the different projects you'll manage with Buildozer.
3034

31-
#. At the end, you should have an APK or AAB file in the `bin/` directory.
35+
#. At the end, you should have an APK or AAB file in the :class:`bin/` directory.
3236

3337

3438
Run my application
@@ -40,29 +44,26 @@ your application at least once::
4044

4145
buildozer android deploy run logcat
4246

43-
For iOS, it would look the same::
47+
- For iOS, it would look the same::
4448

4549
buildozer ios deploy run
4650

47-
You can combine the compilation with the deployment::
51+
- You can combine the compilation with the deployment::
4852

4953
buildozer -v android debug deploy run logcat
5054

51-
You can also set this line at the default command to do if Buildozer is started
52-
without any arguments::
55+
- You can also set this line at the default command to do if Buildozer is started without any arguments::
5356

5457
buildozer setdefault android debug deploy run logcat
5558
5659
# now just type buildozer, and it will do the default command
5760
buildozer
5861

59-
To save the logcat output into a file named `my_log.txt` (the file will appear in your current directory)::
62+
- To save the logcat output into a file named :class:`my_log.txt` (the file will appear in your current directory)::
6063

6164
buildozer -v android debug deploy run logcat > my_log.txt
6265
63-
To see your running application's print() messages and python's error messages, use:
64-
65-
::
66+
- To see your running application's print() messages and python's error messages, use::
6667

6768
buildozer -v android deploy run logcat | grep python
6869

@@ -71,21 +72,16 @@ Run my application from Windows
7172

7273
- Plug your Android device on a USB port.
7374

74-
- Open Windows PowerShell, go into the folder where you installed the Windows version of ADB, and activate the ADB daemon. When the daemon is started you must see a number besides the word "device" meaning your device was correctly detected. In case of trouble, try another USB port or USB cable.
75-
76-
::
75+
- Open Windows PowerShell, go into the folder where you installed the Windows version of ADB, and activate the ADB daemon. When the daemon is started you must see a number besides the word "device" meaning your device was correctly detected. In case of trouble, try another USB port or USB cable.::
7776

7877
cd C:\platform-tools\
7978
.\adb.exe devices
8079

81-
- Open the Linux distribution you installed on Windows Subsystem for Linux (WSL) and proceed with the deploy commands:
82-
83-
::
80+
- Open the Linux distribution you installed on Windows Subsystem for Linux (WSL) and proceed with the deploy commands::
8481

8582
buildozer -v android deploy run
8683
87-
It is important to notice that Windows ADB and Buildozer-installed ADB must be the same version. To check the versions,
88-
open PowerShell and type::
84+
- It is important to notice that Windows ADB and Buildozer-installed ADB must be the same version. To check the versions, open PowerShell and type::
8985

9086
cd C:\platform-tools\
9187
.\adb.exe version
@@ -97,8 +93,8 @@ Install on non-connected devices
9793
--------------------------------
9894

9995
If you have compiled a package, and want to share it easily with others
100-
devices, you might be interested with the `serve` command. It will serve the
101-
`bin/` directory over HTTP. Then you just have to access to the URL showed in
96+
devices, you might be interested with the :class:`serve` command. It will serve the
97+
:class:`bin/` directory over HTTP. Then you just have to access to the URL showed in
10298
the console from your mobile::
10399

104100
buildozer serve

docs/source/recipes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
.. _recipes:
2+
13
Recipes
24
=======
35

6+
..rst-class: lead
7+
8+
Compiling our python packages.
9+
10+
Overview
11+
--------
12+
413
Python apps may depend on third party packages and extensions.
514

615
Most packages are written in pure Python, and Buildozer can generally used them

0 commit comments

Comments
 (0)