Merge pull request #358 from hackalog/add_info
Add build_info subcommand
This commit is contained in:
commit
e3fa7a300f
1 changed files with 22 additions and 0 deletions
22
toolchain.py
22
toolchain.py
|
@ -20,6 +20,8 @@ import fnmatch
|
|||
import tempfile
|
||||
import time
|
||||
from datetime import datetime
|
||||
from pprint import pformat
|
||||
|
||||
try:
|
||||
from urllib.request import FancyURLopener, urlcleanup
|
||||
except ImportError:
|
||||
|
@ -1264,6 +1266,7 @@ Available commands:
|
|||
distclean Clean the build and the result
|
||||
recipes List all the available recipes
|
||||
status List all the recipes and their build status
|
||||
build_info Display the current build context and Architecture info
|
||||
|
||||
Xcode:
|
||||
create Create a new xcode project
|
||||
|
@ -1456,6 +1459,25 @@ Xcode:
|
|||
print("--")
|
||||
print("Project {} updated".format(filename))
|
||||
|
||||
def build_info(self):
|
||||
ctx = Context()
|
||||
print("Build Context")
|
||||
print("-------------")
|
||||
for attr in dir(ctx):
|
||||
if not attr.startswith("_"):
|
||||
if not callable(attr) and attr != 'archs':
|
||||
print("{}: {}".format(attr, pformat(getattr(ctx, attr))))
|
||||
for arch in ctx.archs:
|
||||
ul = '-' * (len(str(arch))+6)
|
||||
print("\narch: {}\n{}".format(str(arch), ul))
|
||||
for attr in dir(arch):
|
||||
if not attr.startswith("_"):
|
||||
if not callable(attr) and attr not in ['arch', 'ctx', 'get_env']:
|
||||
print("{}: {}".format(attr, pformat(getattr(arch, attr))))
|
||||
env = arch.get_env()
|
||||
print("env ({}): {}".format(arch, pformat(env)))
|
||||
|
||||
|
||||
def pip(self):
|
||||
ctx = Context()
|
||||
for recipe in Recipe.list_recipes():
|
||||
|
|
Loading…
Reference in a new issue