Skip to content

Commit

Permalink
Merge pull request #338 from kived/android_new-color
Browse files Browse the repository at this point in the history
use p4a --color argument
  • Loading branch information
kived committed May 8, 2016
2 parents 0af7976 + c0aae22 commit 77fc345
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions buildozer/targets/android_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys

from buildozer.targets.android import TargetAndroid
from buildozer import USE_COLOR
from os.path import join, expanduser, realpath


Expand All @@ -17,8 +18,9 @@ class TargetAndroidNew(TargetAndroid):
def __init__(self, buildozer):
super(TargetAndroidNew, self).__init__(buildozer)
self._build_dir = join(self.buildozer.platform_dir, 'build')
self._p4a_cmd = ('python -m pythonforandroid.toolchain '
'--storage-dir={} ').format(self._build_dir)
color = 'always' if USE_COLOR else 'never'
self._p4a_cmd = ('python -m pythonforandroid.toolchain --color={} '
'--storage-dir={} ').format(color, self._build_dir)

def _p4a(self, cmd, **kwargs):
kwargs.setdefault('cwd', self.pa_dir)
Expand Down

0 comments on commit 77fc345

Please sign in to comment.