Skip to content

Commit c9c43fe

Browse files
committed
add warning about ignored distributions
1 parent 70b5934 commit c9c43fe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pythonforandroid/distribution.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,18 @@ def get_distributions(cls, ctx, extra_dist_dirs=[]):
190190
dist.recipes = dist_info['recipes']
191191
if 'archs' in dist_info:
192192
dist.archs = dist_info['archs']
193-
dist.ndk_api = dist_info.get('ndk_api', 0)
193+
if 'ndk_api' in dist_info:
194+
dist.ndk_api = dist_info['ndk_api']
195+
else:
196+
dist.ndk_api = 0
197+
warning(
198+
"Distribution {distname}: (distdir) has been "
199+
"built with an unknown api target, ignoring it, "
200+
"you might want to delete it".format(
201+
distname=dist.name,
202+
distdir=dist.dist_dir
203+
)
204+
)
194205
dists.append(dist)
195206
return dists
196207

0 commit comments

Comments
 (0)