clean up output somewhat and add to usage
This commit is contained in:
parent
0e163f4560
commit
7b58f0f6cc
1 changed files with 10 additions and 10 deletions
20
toolchain.py
20
toolchain.py
|
@ -20,6 +20,8 @@ import fnmatch
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from pprint import pformat
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from urllib.request import FancyURLopener, urlcleanup
|
from urllib.request import FancyURLopener, urlcleanup
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -1240,6 +1242,7 @@ Available commands:
|
||||||
distclean Clean the build and the result
|
distclean Clean the build and the result
|
||||||
recipes List all the available recipes
|
recipes List all the available recipes
|
||||||
status List all the recipes and their build status
|
status List all the recipes and their build status
|
||||||
|
build_info Display the current build context and Architecture info
|
||||||
|
|
||||||
Xcode:
|
Xcode:
|
||||||
create Create a new xcode project
|
create Create a new xcode project
|
||||||
|
@ -1432,26 +1435,23 @@ Xcode:
|
||||||
print("--")
|
print("--")
|
||||||
print("Project {} updated".format(filename))
|
print("Project {} updated".format(filename))
|
||||||
|
|
||||||
def info(self):
|
def build_info(self):
|
||||||
ctx = Context()
|
ctx = Context()
|
||||||
print("Build Context")
|
print("Build Context")
|
||||||
print("-------------")
|
print("-------------")
|
||||||
from pprint import pformat, pprint
|
|
||||||
for attr in dir(ctx):
|
for attr in dir(ctx):
|
||||||
if not attr.startswith("_"):
|
if not attr.startswith("_"):
|
||||||
if not callable(attr) and attr != 'archs':
|
if not callable(attr) and attr != 'archs':
|
||||||
print(f"{attr}: {pformat(getattr(ctx, attr))}")
|
print("{}: {}".format(attr, pformat(getattr(ctx, attr))))
|
||||||
print("Architectures")
|
|
||||||
print("=============")
|
|
||||||
for arch in ctx.archs:
|
for arch in ctx.archs:
|
||||||
ul = '-' * (len(str(arch))+6)
|
ul = '-' * (len(str(arch))+6)
|
||||||
print(f"{ul}\nArch: {str(arch)}\n{ul}")
|
print("\narch: {}\n{}".format(str(arch), ul))
|
||||||
for attr in dir(arch):
|
for attr in dir(arch):
|
||||||
if not attr.startswith("_"):
|
if not attr.startswith("_"):
|
||||||
if not callable(attr) and attr not in ['arch', 'ctx']:
|
if not callable(attr) and attr not in ['arch', 'ctx', 'get_env']:
|
||||||
print(f"{attr}: {pformat(getattr(arch, attr))}")
|
print("{}: {}".format(attr, pformat(getattr(arch, attr))))
|
||||||
print("env:")
|
env = arch.get_env()
|
||||||
pprint(arch.get_env())
|
print("env ({}): {}".format(arch, pformat(env)))
|
||||||
|
|
||||||
|
|
||||||
def pip(self):
|
def pip(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue