Merge pull request #805 from inclement/remove_duplicated_ndk_api

Removed redundant --ndk-api argument and fixed default value
This commit is contained in:
Andre Miras 2019-01-30 16:14:17 +01:00 committed by GitHub
commit 07b910c62b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,13 @@ class TargetAndroidNew(TargetAndroid):
color = 'always' if USE_COLOR else 'never' color = 'always' if USE_COLOR else 'never'
self.extra_p4a_args = ' --color={} --storage-dir="{}"'.format( self.extra_p4a_args = ' --color={} --storage-dir="{}"'.format(
color, self._build_dir) color, self._build_dir)
ndk_api = self.buildozer.config.getdefault('app', 'android.ndk_api', None)
if ndk_api is not None: # minapi should match ndk-api, so can use the same default if
self.extra_p4a_args += ' --ndk-api={}'.format(ndk_api) # nothing is specified
ndk_api = self.buildozer.config.getdefault(
'app', 'android.ndk_api', self.android_minapi)
self.extra_p4a_args += ' --ndk-api={}'.format(ndk_api)
hook = self.buildozer.config.getdefault("app", "p4a.hook", None) hook = self.buildozer.config.getdefault("app", "p4a.hook", None)
if hook is not None: if hook is not None:
self.extra_p4a_args += ' --hook={}'.format(realpath(hook)) self.extra_p4a_args += ' --hook={}'.format(realpath(hook))
@ -76,10 +80,8 @@ class TargetAndroidNew(TargetAndroid):
config = self.buildozer.config config = self.buildozer.config
self._p4a( self._p4a(
("create --dist_name={} --bootstrap={} --requirements={} " ("create --dist_name={} --bootstrap={} --requirements={} "
"--ndk-api {} "
"--arch {} {}").format( "--arch {} {}").format(
dist_name, self._p4a_bootstrap, requirements, dist_name, self._p4a_bootstrap, requirements,
config.getdefault('app', 'android.minapi', self.android_minapi),
config.getdefault('app', 'android.arch', "armeabi-v7a"), " ".join(options)), config.getdefault('app', 'android.arch', "armeabi-v7a"), " ".join(options)),
get_stdout=True)[0] get_stdout=True)[0]