2014-04-20 18:09:07 +02:00
|
|
|
Specifications
|
|
|
|
==============
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
This document explains in detail all the configuration tokens you can use in
|
2014-04-20 18:09:07 +02:00
|
|
|
`buildozer.spec`.
|
|
|
|
|
|
|
|
Section [app]
|
|
|
|
-------------
|
|
|
|
|
|
|
|
- `title`: String, title of your application.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
It might be possible that some characters are not working depending on the
|
2017-09-11 23:40:18 +02:00
|
|
|
targeted platform. It's best to try and see if everything works as expected.
|
2014-07-19 21:22:02 +02:00
|
|
|
Try to avoid too long titles, as they will also not fit in the title
|
|
|
|
displayed under the icon.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
- `package.name`: String, package name.
|
|
|
|
|
|
|
|
The Package name is one word with only ASCII characters and/or numbers. It
|
|
|
|
should not contain any special characters. For example, if your application
|
|
|
|
is named `Flat Jewels`, the package name can be `flatjewels`.
|
|
|
|
|
|
|
|
- `package.domain`: String, package domain.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
Package domain is a string that references the company or individual that
|
|
|
|
did the app. Both domain+name will become your application identifier for
|
|
|
|
Android and iOS, choose it carefully. As an example, when the Kivy`s team
|
|
|
|
is publishing an application, the domain starts with `org.kivy`.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
- `source.dir`: String, location of your application sources.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
The location must be a directory that contains a `main.py` file. It defaults
|
|
|
|
to the directory where `buildozer.spec` is.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
2017-09-11 23:40:18 +02:00
|
|
|
- `source.include_exts`: List, file extensions to include.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
By default, not all files in your `source.dir` are included, but only some
|
|
|
|
of them (`py,png,jpg,kv,atlas`), depending on the extension. Feel free to
|
|
|
|
add your own extensions, or use an empty value if you want to include
|
2014-04-20 18:09:07 +02:00
|
|
|
everything.
|
|
|
|
|
2017-09-11 23:40:18 +02:00
|
|
|
- `source.exclude_exts`: List, file extensions to exclude.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
In contrary to `source.include_exts`, you could include all the files you
|
2014-07-19 21:22:02 +02:00
|
|
|
want except the ones that end with an extension listed in this token. If
|
|
|
|
empty, no files will be excluded based on their extensions.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
- `source.exclude_dirs`: List, directories to exclude.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
Same as `source.exclude_exts`, but for directories. You can exclude your
|
|
|
|
`tests` and `bin` directory with::
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
source.exclude_dirs = tests, bin
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
- `source.exclude_patterns`: List, files to exclude if they match a pattern.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
If you have a more complex application layout, you might need a pattern to
|
2014-07-19 21:22:02 +02:00
|
|
|
exclude files. It also works if you don't have a pattern. For example::
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
source.exclude_patterns = license,images/originals/*
|
|
|
|
|
|
|
|
- `version.regex`: Regex, Regular expression to capture the version in
|
|
|
|
`version.filename`.
|
|
|
|
|
|
|
|
The default capture method of your application version is by grepping a line
|
2014-07-19 21:22:02 +02:00
|
|
|
like this::
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
__version__ = "1.0"
|
|
|
|
|
|
|
|
The `1.0` will be used as a version.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
- `version.filename`: String, defaults to the main.py.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
File to use for capturing the version with `version.regex`.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
- `version`: String, manual application version.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
If you don't want to capture the version, comment out both `version.regex`
|
|
|
|
and `version.filename`, then put the version you want directly in the
|
|
|
|
`version` token::
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
# version.regex =
|
|
|
|
# version.filename =
|
|
|
|
version = 1.0
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
- `requirements`: List, Python modules or extensions that your application
|
|
|
|
requires.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
The requirements can be either a name of a recipe in the Python-for-android
|
2014-07-19 21:22:02 +02:00
|
|
|
project, or a pure-Python package. For example, if your application requires
|
2014-04-20 18:09:07 +02:00
|
|
|
Kivy and requests, you need to write::
|
|
|
|
|
|
|
|
requirements = kivy,requests
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
If your application tries to install a Python extension (ie, a Python
|
|
|
|
package that requires compilation), and the extension doesn't have a recipe
|
|
|
|
associated to Python-for-android, it will not work. We explicitly disable
|
|
|
|
the compilation here. If you want to make it work, contribute to the
|
|
|
|
Python-for-android project by creating a recipe. See :doc:`contribute`.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
- `presplash.filename`: String, loading screen of your application.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
Presplash is the image shown on the device during application loading.
|
2014-04-20 18:09:07 +02:00
|
|
|
It is called presplash on Android, and Loading image on iOS. The image might
|
|
|
|
have different requirements depending the platform. Currently, Buildozer
|
|
|
|
works well only with Android, iOS support is not great on this.
|
|
|
|
|
2017-09-11 23:40:18 +02:00
|
|
|
The image must be a JPG or PNG, preferable with Power-of-two size, e.g., a
|
2014-04-20 18:09:07 +02:00
|
|
|
512x512 image is perfect to target all the devices. The image is not fitted,
|
|
|
|
scaled, or anything on the device. If you provide a too-large image, it might
|
|
|
|
not fit on small screens.
|
|
|
|
|
|
|
|
- `icon.filename`: String, icon of your application.
|
|
|
|
|
|
|
|
The icon of your application. It must be a PNG of 512x512 size to be able to
|
|
|
|
cover all the various platform requirements.
|
|
|
|
|
|
|
|
- `orientation`: String, orientation of the application.
|
|
|
|
|
2014-07-19 21:22:02 +02:00
|
|
|
Indicate the orientation that your application supports. Defaults to
|
2014-04-20 18:09:07 +02:00
|
|
|
`landscape`, but can be changed to `portrait` or `all`.
|
|
|
|
|
|
|
|
- `fullscreen`: Boolean, fullscreen mode.
|
|
|
|
|
|
|
|
Defaults to true, your application will run in fullscreen. Means the status
|
2014-07-19 21:22:02 +02:00
|
|
|
bar will be hidden. If you want to let the user access the status bar,
|
|
|
|
hour, notifications, use 0 as a value.
|
2014-04-20 18:09:07 +02:00
|
|
|
|