Added BUILDOZER_P4A_DIR env var behaviour

This commit is contained in:
Alexander Taylor 2013-11-08 22:10:48 +00:00
parent 5a720e24c9
commit b72176095d

View file

@ -300,6 +300,13 @@ class TargetAndroid(Target):
cmd = self.buildozer.cmd cmd = self.buildozer.cmd
self.pa_dir = pa_dir = join(self.buildozer.platform_dir, 'python-for-android') self.pa_dir = pa_dir = join(self.buildozer.platform_dir, 'python-for-android')
if not self.buildozer.file_exists(pa_dir): if not self.buildozer.file_exists(pa_dir):
print ' FILE NOT EXISTS'
buildozer_p4a_dir = os.environ.get('BUILDOZER_P4A_DIR')
print '!!!', buildozer_p4a_dir
if buildozer_p4a_dir:
cmd('ln -s {} ./python-for-android'.format(buildozer_p4a_dir),
cwd = self.buildozer.platform_dir)
else:
cmd('git clone git://github.com/kivy/python-for-android', cmd('git clone git://github.com/kivy/python-for-android',
cwd=self.buildozer.platform_dir) cwd=self.buildozer.platform_dir)
elif self.platform_update: elif self.platform_update: