summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/reformat_sysconfig.py
Commit message (Collapse)AuthorAgeFilesLines
* python3: Fix sysroot reproducibilityJoshua Watt2021-10-011-1/+1
| | | | | | | | | | | | | | | Fixes the reformatting of the sysconfigdata to be reproducible in the sysroot as well as in the package. During this a bug was uncovered in the way that the data was reformatted where it appears that python cannot parse a single line of code over 40000 characters. To work around this, pass a maximum with of "1" to pprint instead of sys.maxsize which will cause it to wrap as often as possible and should keep it reproducible. (From OE-Core rev: 2def2c145c303f27d93ba73876d4c6b214f18166) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: Reformat sysconfigJoshua Watt2019-06-241-0/+21
Reformats the sysconfig file when packaging. This file is output by using the python pprint function. This function will wrap long lines at 80 characters by default, and will even split strings at whitespace boundaries to do so, e.g.: 'A': 'B is really' ' long' This causes a problem for reproducibility however because there might be lines of differing lengths depending on the build path. These non-reproducible paths are removed, but their effect on string wrapping from pprint remains. To correct this, reformat the entire sysconfig file by re-printing using pprint with an (effectively) unlimited line length. (From OE-Core rev: ec8a2b310d5f0b42f60898a5c6d239949842b34c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>