def parse_yaml(stream, overrides={}):
import yaml
import sys
from autocmake.interpolate import interpolate
try:
config = yaml.load(stream, yaml.SafeLoader)
except yaml.YAMLError as exc:
print(exc)
sys.exit(-1)
for k in config:
if k in overrides:
config[k] = overrides[k]
config = interpolate(config, config)
return config
评论列表
文章目录