From patchwork Mon Nov 9 14:38:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 103522 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7433.1794235112461956954 for ; Mon, 09 Nov 2026 06:38:32 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=Cr67PJNJ; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CFDEE14BF for ; Mon, 9 Nov 2026 06:38:28 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 88C863F85F for ; Mon, 9 Nov 2026 06:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1794235111; bh=U70mj18+FJAJ8al1KJYoHNNKOJVBfdB8AXShsni+MBo=; h=From:To:Subject:Date:From; b=Cr67PJNJHG4vYsu49VaqHAerAGllA55Pri6NTnMJRWPV3tEwBPlyhIvTE2TyhRRuF glQpwI/J4DfL7kiXlGuu4J+r4iaY4Z61X3blSvmVROnIzMlUyaZTJlThqk+6dhCkrG vjCzHEuVnlkPbErKR9x1xIp51mHla9/Mb+a1QJR0= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/2] python3: remove obsolete reformatting of _sysconfigdata*.py Date: Mon, 9 Nov 2026 14:38:25 +0000 Message-ID: <20261109143827.3411115-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-ARM-No-Footer: NoDisclaimer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 09 Nov 2026 14:38:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249854 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 --- .../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 diff --git a/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py deleted file mode 100644 index 5e2b12879d9..00000000000 --- a/meta/recipes-devtools/python/python3/reformat_sysconfig.py +++ /dev/null @@ -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') - diff --git a/meta/recipes-devtools/python/python3_3.14.10.bb b/meta/recipes-devtools/python/python3_3.14.10.bb index c50c4d4babc..28e67330d1a 100644 --- a/meta/recipes-devtools/python/python3_3.14.10.bb +++ b/meta/recipes-devtools/python/python3_3.14.10.bb @@ -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