summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/reformat_sysconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3/reformat_sysconfig.py')
-rw-r--r--meta/recipes-devtools/python/python3/reformat_sysconfig.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
new file mode 100644
index 0000000000..c4164313e8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/reformat_sysconfig.py
@@ -0,0 +1,21 @@
+#! /usr/bin/env python3
+#
+# SPDX-License-Identifier: MIT
+#
+# Copyright 2019 by Garmin Ltd. or its subsidiaries
+#
+# A script to reformat python sysconfig
+
+import sys
+import pprint
+l = {}
+g = {}
+with open(sys.argv[1], 'r') as f:
+ exec(f.read(), g, l)
+
+with open(sys.argv[1], 'w') as f:
+ for k in sorted(l.keys()):
+ f.write('%s = ' % k)
+ pprint.pprint(l[k], stream=f, width=sys.maxsize)
+ f.write('\n')
+