@@ -44,7 +44,6 @@ def __repr__(self):
44
44
45
45
@classmethod
46
46
def get_distribution (cls , ctx , name = None , recipes = [],
47
- ndk_api = None ,
48
47
force_build = False ,
49
48
extra_dist_dirs = [],
50
49
require_perfect_match = False ,
@@ -93,9 +92,7 @@ def get_distribution(cls, ctx, name=None, recipes=[],
93
92
# 1) Check if any existing dists meet the requirements
94
93
_possible_dists = []
95
94
for dist in possible_dists :
96
- if (
97
- ndk_api is not None and dist .ndk_api != ndk_api
98
- ) or dist .ndk_api is None :
95
+ if (dist .ndk_api != ctx .ndk_api ) or dist .ndk_api is None :
99
96
continue
100
97
for recipe in recipes :
101
98
if recipe not in dist .recipes :
@@ -115,7 +112,7 @@ def get_distribution(cls, ctx, name=None, recipes=[],
115
112
for dist in possible_dists :
116
113
if force_build :
117
114
continue
118
- if ndk_api is not None and dist .ndk_api != ndk_api :
115
+ if ctx . ndk_api is not None and dist .ndk_api != ctx . ndk_api :
119
116
continue
120
117
if (set (dist .recipes ) == set (recipes ) or
121
118
(set (recipes ).issubset (set (dist .recipes )) and
@@ -136,7 +133,7 @@ def get_distribution(cls, ctx, name=None, recipes=[],
136
133
'with this name already exists and has either incompatible recipes '
137
134
'({dist_recipes}) or NDK API {dist_ndk_api}' .format (
138
135
name = name ,
139
- req_ndk_api = ndk_api ,
136
+ req_ndk_api = ctx . ndk_api ,
140
137
dist_ndk_api = name_match_dist .ndk_api ,
141
138
req_recipes = ', ' .join (recipes ),
142
139
dist_recipes = ', ' .join (name_match_dist .recipes )))
0 commit comments