diff --git a/README.rst b/README.rst index 7e3c912..373c8c7 100644 --- a/README.rst +++ b/README.rst @@ -87,3 +87,20 @@ buildozer.spec See `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`` + diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 75dae05..0aaf462 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -301,7 +301,7 @@ class TargetAndroid(Target): 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)