Merge pull request #1269 from xloem/p4a_commit
Let buildozer.spec files pin to a specific p4a commit hash
This commit is contained in:
commit
593319c3ba
2 changed files with 9 additions and 0 deletions
|
@ -272,6 +272,9 @@ android.allow_backup = True
|
||||||
# (str) python-for-android branch to use, defaults to master
|
# (str) python-for-android branch to use, defaults to master
|
||||||
#p4a.branch = master
|
#p4a.branch = master
|
||||||
|
|
||||||
|
# (str) python-for-android specific commit to use, defaults to HEAD, must be within p4a.branch
|
||||||
|
#p4a.commit = HEAD
|
||||||
|
|
||||||
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
||||||
#p4a.source_dir =
|
#p4a.source_dir =
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ class TargetAndroid(Target):
|
||||||
p4a_directory_name = "python-for-android"
|
p4a_directory_name = "python-for-android"
|
||||||
p4a_fork = 'kivy'
|
p4a_fork = 'kivy'
|
||||||
p4a_branch = 'master'
|
p4a_branch = 'master'
|
||||||
|
p4a_commit = 'HEAD'
|
||||||
p4a_apk_cmd = "apk --debug --bootstrap="
|
p4a_apk_cmd = "apk --debug --bootstrap="
|
||||||
p4a_recommended_ndk_version = None
|
p4a_recommended_ndk_version = None
|
||||||
extra_p4a_args = ''
|
extra_p4a_args = ''
|
||||||
|
@ -693,6 +694,9 @@ class TargetAndroid(Target):
|
||||||
p4a_branch = self.buildozer.config.getdefault(
|
p4a_branch = self.buildozer.config.getdefault(
|
||||||
'app', 'p4a.branch', self.p4a_branch
|
'app', 'p4a.branch', self.p4a_branch
|
||||||
)
|
)
|
||||||
|
p4a_commit = self.buildozer.config.getdefault(
|
||||||
|
'app', 'p4a.commit', self.p4a_commit
|
||||||
|
)
|
||||||
|
|
||||||
p4a_dir = self.p4a_dir
|
p4a_dir = self.p4a_dir
|
||||||
system_p4a_dir = self.buildozer.config.getdefault('app',
|
system_p4a_dir = self.buildozer.config.getdefault('app',
|
||||||
|
@ -743,6 +747,8 @@ class TargetAndroid(Target):
|
||||||
cmd('git fetch --tags origin {0}:{0}'.format(p4a_branch),
|
cmd('git fetch --tags origin {0}:{0}'.format(p4a_branch),
|
||||||
cwd=p4a_dir)
|
cwd=p4a_dir)
|
||||||
cmd('git checkout {}'.format(p4a_branch), cwd=p4a_dir)
|
cmd('git checkout {}'.format(p4a_branch), cwd=p4a_dir)
|
||||||
|
if p4a_commit != 'HEAD':
|
||||||
|
cmd('git reset --hard {}'.format(p4a_commit), cwd=p4a_dir)
|
||||||
|
|
||||||
# also install dependencies (currently, only setup.py knows about it)
|
# also install dependencies (currently, only setup.py knows about it)
|
||||||
# let's extract them.
|
# let's extract them.
|
||||||
|
|
Loading…
Reference in a new issue