diff options
Diffstat (limited to 'poky/meta/recipes-devtools/python/python3_3.10.4.bb')
-rw-r--r-- | poky/meta/recipes-devtools/python/python3_3.10.4.bb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/poky/meta/recipes-devtools/python/python3_3.10.4.bb b/poky/meta/recipes-devtools/python/python3_3.10.4.bb index d678d55083..34fd2895a3 100644 --- a/poky/meta/recipes-devtools/python/python3_3.10.4.bb +++ b/poky/meta/recipes-devtools/python/python3_3.10.4.bb @@ -33,6 +33,9 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \ file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \ file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \ + file://deterministic_imports.patch \ + file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ + file://0001-gh-92036-Fix-gc_fini_untrack-GH-92037.patch \ " SRC_URI:append:class-native = " \ @@ -165,6 +168,9 @@ do_install:append:class-native() { # tarballs and sysroot creation. find ${D} -name *.pyc -delete + # Nothing should be looking into ${B} for python3-native + sed -i -e 's:${B}:/build/path/unavailable/:g' \ + ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile } do_install:append() { @@ -175,15 +181,16 @@ do_install:append() { mkdir -p ${D}${libdir}/python-sysconfigdata sysconfigfile=`find ${D} -name _sysconfig*.py` - cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py - sed -i \ -e "s,^ 'LIBDIR'.*, 'LIBDIR': '${STAGING_LIBDIR}'\,,g" \ -e "s,^ 'INCLUDEDIR'.*, 'INCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ -e "s,^ 'CONFINCLUDEDIR'.*, 'CONFINCLUDEDIR': '${STAGING_INCDIR}'\,,g" \ -e "/^ 'INCLDIRSTOMAKE'/{N; s,/usr/include,${STAGING_INCDIR},g}" \ -e "/^ 'INCLUDEPY'/s,/usr/include,${STAGING_INCDIR},g" \ - ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py + -e "s,${B},/build/path/unavailable/,g" \ + $sysconfigfile + cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py + # Unfortunately the following pyc files are non-deterministc due to 'frozenset' # being written without strict ordering, even with PYTHONHASHSEED = 0 @@ -193,6 +200,11 @@ do_install:append() { rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython* rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython* + # Similar to the above, we're getting reproducibility issues with + # /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc + # so remove it too + rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython* + # Remove the opt-1.pyc and opt-2.pyc files. They effectively waste space on embedded # style targets as they're only used when python is called with the -O or -OO options # which is rare. |