Add an info target to display arch/context information
This commit is contained in:
parent
8f87410cf5
commit
0e163f4560
1 changed files with 22 additions and 0 deletions
22
toolchain.py
22
toolchain.py
|
@ -1432,6 +1432,28 @@ Xcode:
|
|||
print("--")
|
||||
print("Project {} updated".format(filename))
|
||||
|
||||
def info(self):
|
||||
ctx = Context()
|
||||
print("Build Context")
|
||||
print("-------------")
|
||||
from pprint import pformat, pprint
|
||||
for attr in dir(ctx):
|
||||
if not attr.startswith("_"):
|
||||
if not callable(attr) and attr != 'archs':
|
||||
print(f"{attr}: {pformat(getattr(ctx, attr))}")
|
||||
print("Architectures")
|
||||
print("=============")
|
||||
for arch in ctx.archs:
|
||||
ul = '-' * (len(str(arch))+6)
|
||||
print(f"{ul}\nArch: {str(arch)}\n{ul}")
|
||||
for attr in dir(arch):
|
||||
if not attr.startswith("_"):
|
||||
if not callable(attr) and attr not in ['arch', 'ctx']:
|
||||
print(f"{attr}: {pformat(getattr(arch, attr))}")
|
||||
print("env:")
|
||||
pprint(arch.get_env())
|
||||
|
||||
|
||||
def pip(self):
|
||||
ctx = Context()
|
||||
for recipe in Recipe.list_recipes():
|
||||
|
|
Loading…
Add table
Reference in a new issue