blob: 5e2b12879d9578183aa1dfebd27c3ba34f088ea5 [file] [log] [blame]
Brad Bishopc8f47122019-06-24 09:36:18 -04001#! /usr/bin/env python3
2#
3# SPDX-License-Identifier: MIT
4#
5# Copyright 2019 by Garmin Ltd. or its subsidiaries
6#
7# A script to reformat python sysconfig
8
9import sys
10import pprint
11l = {}
12g = {}
13with open(sys.argv[1], 'r') as f:
14 exec(f.read(), g, l)
15
16with open(sys.argv[1], 'w') as f:
17 for k in sorted(l.keys()):
18 f.write('%s = ' % k)
Patrick Williams93c203f2021-10-06 16:15:23 -050019 pprint.pprint(l[k], stream=f, width=1)
Brad Bishopc8f47122019-06-24 09:36:18 -040020 f.write('\n')
21