Skip to content

Improved recipe output #524

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 1 commit into from
Dec 10, 2015
Merged
Changes from all 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
40 changes: 21 additions & 19 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2840,32 +2840,34 @@ def recipes(self, args):

args = parser.parse_args(args)

Fore = Out_Fore
Style = Out_Style
if not args.color:
Fore = Null_Fore
Style = Null_Style

if args.compact:
print(" ".join(list(Recipe.list_recipes())))
else:
ctx = self.ctx
for name in sorted(Recipe.list_recipes()):
recipe = Recipe.get_recipe(name, ctx)
version = str(recipe.version)
if args.color:
print('{Fore.BLUE}{Style.BRIGHT}{recipe.name:<12} '
'{Style.RESET_ALL}{Fore.LIGHTBLUE_EX}'
'{version:<8}{Style.RESET_ALL}'.format(
recipe=recipe, Fore=Out_Fore, Style=Out_Style,
version=version))
print(' {Fore.GREEN}depends: {recipe.depends}'
'{Fore.RESET}'.format(recipe=recipe, Fore=Out_Fore))
if recipe.conflicts:
print(' {Fore.RED}conflicts: {recipe.conflicts}'
'{Fore.RESET}'
.format(recipe=recipe, Fore=Out_Fore))
else:
print("{recipe.name:<12} {recipe.version:<8}"
.format(recipe=recipe))
print(' depends: {recipe.depends}'
.format(recipe=recipe))
print(' conflicts: {recipe.conflicts}'
.format(recipe=recipe))
print('{Fore.BLUE}{Style.BRIGHT}{recipe.name:<12} '
'{Style.RESET_ALL}{Fore.LIGHTBLUE_EX}'
'{version:<8}{Style.RESET_ALL}'.format(
recipe=recipe, Fore=Fore, Style=Style,
version=version))
print(' {Fore.GREEN}depends: {recipe.depends}'
'{Fore.RESET}'.format(recipe=recipe, Fore=Fore))
if recipe.conflicts:
print(' {Fore.RED}conflicts: {recipe.conflicts}'
'{Fore.RESET}'
.format(recipe=recipe, Fore=Fore))
if recipe.opt_depends:
print(' {Fore.YELLOW}optional depends: '
'{recipe.opt_depends}{Fore.RESET}'
.format(recipe=recipe, Fore=Fore))

def bootstraps(self, args):
'''List all the bootstraps available to build with.'''
Expand Down