deleted file mode 100644
@@ -1,21 +0,0 @@
-#! /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=1)
- f.write('\n')
-
@@ -12,7 +12,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
file://get_module_deps3.py \
file://python3-manifest.json \
file://check_build_completeness.py \
- file://reformat_sysconfig.py \
file://0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch \
file://0001-test_locale.py-correct-the-test-output-format.patch \
file://makerace.patch \
@@ -214,9 +213,6 @@ do_install:append:class-native() {
}
do_install:append() {
- for c in ${D}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
- python3 ${UNPACKDIR}/reformat_sysconfig.py $c
- done
rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.cpython*
mkdir -p ${D}${libdir}/python-sysconfigdata
@@ -389,10 +385,8 @@ py_package_preprocess () {
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfig_vars*.json \
${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config
- # Reformat and recompile _sysconfigdata after modifying it so that it remains
- # reproducible
+ # Recompile _sysconfigdata after modifying it
for c in ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata*.py; do
- python3 ${UNPACKDIR}/reformat_sysconfig.py $c
python3 -mcompileall $c -s ${PKGD} -p /
done
The python3 recipe currently reformats the _sysconfigdata*.py files after they are modified to remove build paths, as the files may be wrapped differently based on the length of strings[1]. However, this wrapping was due to the use of pprint.pprint(), which since Python 3.13 is no longer used to generate the sysconfigdata[2]. As such, remove the reformatting as it is no longer needed. [1] oe-core ec8a2b310d5 ("python3: Reformat sysconfig") [2] python 5ecedbd2669 ("gh-106789: avoid importing pprint from sysconfig (#106790)") Signed-off-by: Ross Burton <ross.burton@arm.com> --- .../python/python3/reformat_sysconfig.py | 21 ------------------- .../python/python3_3.14.10.bb | 8 +------ 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/reformat_sysconfig.py