aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-03-23 18:56:50 +0100
committerSimon Warta <[email protected]>2017-03-25 19:28:49 +0100
commitf37885f53bbdf7fd1764ec2e8bd58c4df32dcb27 (patch)
tree297b32d2ea477734e275a10bd01bc911c197633a /configure.py
parent8b1ada76cd9d0610bd498576802b355ede6d4ba7 (diff)
Use JSON to store build config
to improve debuggability
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 86ce4b6e1..d067c5b32 100755
--- a/configure.py
+++ b/configure.py
@@ -19,6 +19,7 @@ CPython 2.5 and earlier are not supported.
On Jython target detection does not work (use --os and --cpu).
"""
+import json
import sys
import os
import os.path
@@ -2495,8 +2496,8 @@ def main(argv=None):
link_headers(build_config.external_headers, 'external',
build_config.external_include_dir)
- with open(os.path.join(build_config.build_dir, 'build_config.py'), 'w') as f:
- f.write(str(template_vars))
+ with open(os.path.join(build_config.build_dir, 'build_config.json'), 'w') as f:
+ json.dump(template_vars, f, sort_keys=True, indent=2)
if options.amalgamation:
amalgamation_cpp_files = generate_amalgamation(build_config, options)