8000 when listing distributions, if one has no ndk_api, consider it to be 0 by tshirtman · Pull Request #1494 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content

when listing distributions, if one has no ndk_api, consider it to be 0 #1494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 14, 2018
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions pythonforandroid/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def get_distribution(cls, ctx, name=None, recipes=[],
# 1) Check if any existing dists meet the requirements
_possible_dists = []
for dist in possible_dists:
if ndk_api is not None and dist.ndk_api != ndk_api:
if (
ndk_api is not None and dist.ndk_api != ndk_api
) or dist.ndk_api is None:
continue
for recipe in recipes:
if recipe not in dist.recipes:
Expand Down Expand Up @@ -190,7 +192,18 @@ def get_distributions(cls, ctx, extra_dist_dirs=[]):
dist.recipes = dist_info['recipes']
if 'archs' in dist_info:
dist.archs = dist_info['archs']
dist.ndk_api = dist_info['ndk_api']
if 'ndk_api' in dist_info:
dist.ndk_api = dist_info['ndk_api']
else:
dist.ndk_api = None
warning(
"Distribution {distname}: ({distdir}) has been "
"built with an unknown api target, ignoring it, "
"you might want to delete it".format(
distname=dist.name,
distdir=dist.dist_dir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distdir seems unused here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though it would make it easier for user to remove it… but i can remove it if it's not relevant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sorry what I mean is the format string seems to add a param that's not used, right?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea kind of looks like (distdir) should be {distdir}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh, i misread that >_<, thanks for your patience 😆

)
)
dists.append(dist)
return dists

Expand Down
0