Skip to content

Commit 9bf6701

Browse files
committed
Moved dist_args references to the main args object
1 parent 3319b44 commit 9bf6701

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pythonforandroid/toolchain.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ def wrapper_func(self, args):
9494
return wrapper_func
9595

9696

97-
def dist_from_args(ctx, dist_args):
97+
def dist_from_args(ctx, args):
9898
'''Parses out any distribution-related arguments, and uses them to
9999
obtain a Distribution class instance for the build.
100100
'''
101101
return Distribution.get_distribution(
102102
ctx,
103-
name=dist_args.dist_name,
104-
recipes=split_argument_list(dist_args.requirements),
105-
extra_dist_dirs=split_argument_list(dist_args.extra_dist_dirs),
106-
require_perfect_match=dist_args.require_perfect_match)
103+
name=args.dist_name,
104+
recipes=split_argument_list(args.requirements),
105+
extra_dist_dirs=split_argument_list(args.extra_dist_dirs),
106+
require_perfect_match=args.require_perfect_match)
107107

108108

109109
def build_dist_from_args(ctx, dist, args):
@@ -668,10 +668,10 @@ def __init__(self):
668668
help='Print some debug information about current built components',
669669
parents=[generic_parser])
670670

671-
print('ready to parse', sys.argv[1:])
672671
args, unknown = parser.parse_known_args(sys.argv[1:])
673672
args.unknown_args = unknown
674-
print('args are', args)
673+
674+
self.args = args
675675

676676
setup_color(args.color)
677677

@@ -853,7 +853,7 @@ def symlink_dist(self, args):
853853
854854
'''
855855
ctx = self.ctx
856-
dist = dist_from_args(ctx, self.dist_args)
856+
dist = dist_from_args(ctx, args)
857857
if dist.needs_build:
858858
info('You asked to symlink a dist, but there is no dist '
859859
'with suitable recipes available. For now, you must '
@@ -863,12 +863,12 @@ def symlink_dist(self, args):
863863

864864
# def _get_dist(self):
865865
# ctx = self.ctx
866-
# dist = dist_from_args(ctx, self.dist_args)
866+
# dist = dist_from_args(ctx, self.args)
867867

868868
@property
869869
def _dist(self):
870870
ctx = self.ctx
871-
dist = dist_from_args(ctx, self.dist_args)
871+
dist = dist_from_args(ctx, self.args)
872872
return dist
873873

874874
@require_prebuilt_dist
@@ -942,7 +942,7 @@ def create(self, args):
942942
pass # The decorator does this for us
943943
# ctx = self.ctx
944944

945-
# dist = dist_from_args(ctx, self.dist_args)
945+
# dist = dist_from_args(ctx, self.args)
946946
# if not dist.needs_build:
947947
# info('You asked to create a distribution, but a dist with '
948948
# 'this name already exists. If you don\'t want to use '

0 commit comments

Comments
 (0)