From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../python/python3/reformat_sysconfig.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 external/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py (limited to 'external/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py') diff --git a/external/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/external/poky/meta/recipes-devtools/python/python3/reformat_sysconfig.py new file mode 100644 index 00000000..c4164313 --- /dev/null +++ b/external/poky/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') + -- cgit 1.2.3-korg