Skip to content

Commit

Permalink
Merge pull request #85 from inclement/p4a_dir_fixes
Browse files Browse the repository at this point in the history
Documented env var checking and fixed a bug in the p4a_dir check
  • Loading branch information
inclement committed Mar 15, 2014
2 parents 65c6705 + f964159 commit 87d1462
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,20 @@ buildozer.spec

See `buildozer/default.spec <https://raw.github.com/kivy/buildozer/master/buildozer/default.spec>`_ for an up-to-date spec file.


Default config
--------------

You can override the value of *any* buildozer.spec config token by
setting an appropriate environment variable. These are all of the
form ``$SECTION_TOKEN``, where SECTION is the config file section and
TOKEN is the config token to override. Dots are replaced by
underscores.

For example, here are some config tokens from the [app] section of the
config, along with the environment variables that would override them.

- ``title`` -> ``$APP_TITLE``
- ``package.name`` -> ``$APP_PACKAGE_NAME``
- ``android.p4a_dir`` -> ``$APP_ANDROID_P4A_DIR``

2 changes: 1 addition & 1 deletion buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def install_platform(self):
cmd = self.buildozer.cmd
self.pa_dir = pa_dir = join(self.buildozer.platform_dir, 'python-for-android')
if not self.buildozer.file_exists(pa_dir):
system_p4a_dir = self.buildozer.config.getdefault('app', 'p4a_dir')
system_p4a_dir = self.buildozer.config.getdefault('app', 'android.p4a_dir')
if system_p4a_dir:
cmd('ln -s {} ./python-for-android'.format(system_p4a_dir),
cwd = self.buildozer.platform_dir)
Expand Down

0 comments on commit 87d1462

Please sign in to comment.