save work
This commit is contained in:
parent
90b89354db
commit
f447153eeb
@ -11,12 +11,12 @@ def gen_cmake_command(config):
|
||||
s.append(' """')
|
||||
s.append(" command = []")
|
||||
|
||||
for env in extract_list(config, 'export'):
|
||||
for env in config['export']:
|
||||
s.append(' command.append({0})'.format(env))
|
||||
|
||||
s.append(" command.append(arguments['--cmake-executable'])")
|
||||
|
||||
for definition in extract_list(config, 'define'):
|
||||
for definition in config['define']:
|
||||
s.append(' command.append({0})'.format(definition))
|
||||
|
||||
s.append(" command.append('-DCMAKE_BUILD_TYPE={0}'.format(arguments['--type']))")
|
||||
@ -70,7 +70,7 @@ def gen_setup(config, relative_path, setup_script_name):
|
||||
|
||||
options = []
|
||||
|
||||
for opt in extract_list(config, 'docopt'):
|
||||
for opt in config['docopt']:
|
||||
first = opt.split()[0].strip()
|
||||
rest = ' '.join(opt.split()[1:]).strip()
|
||||
options.append([first, rest])
|
||||
|
10
update.py
10
update.py
@ -145,17 +145,13 @@ def process_yaml(argv):
|
||||
# fetch modules from the web or from relative paths
|
||||
modules, cleaned_config = fetch_modules(config, relative_path, download_directory)
|
||||
|
||||
# FIXME
|
||||
# for k, v in cleaned_config.items():
|
||||
# print(k, v)
|
||||
|
||||
# fetch files which are not parsed
|
||||
for src in extract_list(config, 'fetch'):
|
||||
for src in cleaned_config['fetch']:
|
||||
dst = os.path.join(download_directory, os.path.basename(src))
|
||||
fetch_url(src, dst)
|
||||
|
||||
# print warnings
|
||||
for warning in extract_list(config, 'warning'):
|
||||
for warning in cleaned_config['warning']:
|
||||
print('- WARNING: {0}'.format(warning))
|
||||
|
||||
# create CMakeLists.txt
|
||||
@ -166,7 +162,7 @@ def process_yaml(argv):
|
||||
|
||||
# create setup script
|
||||
print('- generating setup script')
|
||||
s = gen_setup(config, relative_path, setup_script_name)
|
||||
s = gen_setup(cleaned_config, relative_path, setup_script_name)
|
||||
file_path = os.path.join(project_root, setup_script_name)
|
||||
with open(file_path, 'w') as f:
|
||||
f.write('{0}\n'.format('\n'.join(s)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user