Skip to content

Commit 2391ff0

Browse files
committed
Added archs command to list available archs
1 parent 385e0db commit 2391ff0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pythonforandroid/toolchain.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def require_prebuilt_dist(func):
293293
@wraps(func)
294294
def wrapper_func(self, args):
295295
ctx = self.ctx
296-
ctx.set_archs(self.archs)
296+
ctx.set_archs(self._archs)
297297
ctx.prepare_build_environment(user_sdk_dir=self.sdk_dir,
298298
user_ndk_dir=self.ndk_dir,
299299
user_android_api=self.android_api,
@@ -2727,7 +2727,7 @@ def __init__(self):
27272727
self.android_api = args.android_api
27282728
self.ndk_version = args.ndk_version
27292729

2730-
self.archs = split_argument_list(args.arch)
2730+
self._archs = split_argument_list(args.arch)
27312731

27322732
# AND: Fail nicely if the args aren't handled yet
27332733
if args.extra_dist_dirs:
@@ -3016,6 +3016,13 @@ def print_context_info(self, args):
30163016
'ndk_platform', 'ndk_ver', 'android_api'):
30173017
print('{} is {}'.format(attribute, getattr(ctx, attribute)))
30183018

3019+
def archs(self, args):
3020+
'''List the target architectures available to be built for.'''
3021+
print('{Style.BRIGHT}Available target architectures are:'
3022+
'{Style.RESET_ALL}'.format(Style=Out_Style))
3023+
for arch in self.ctx.archs:
3024+
print(' {}'.format(arch.arch))
3025+
30193026
def dists(self, args):
30203027
'''The same as :meth:`distributions`.'''
30213028
self.distributions(args)

0 commit comments

Comments
 (0)