mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
python3: remove obsolete deletion of non-deterministic .pyc files
These .pyc files were non-deterministic because they used frozensets[1], but this has been fixed in 3.11 onwards. [1] https://github.com/python/cpython/issues/81777 [2] https://github.com/python/cpython/commit/51999c960e7fc45feebd629421dec6524a5fc803 (From OE-Core rev: c8c391ed3e0598a3bea7bc0981126d870315063d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
cb7e73b358
commit
4fabfa60a0
@@ -235,20 +235,6 @@ do_install:append() {
|
|||||||
$sysconfigfile
|
$sysconfigfile
|
||||||
cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
|
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
|
|
||||||
# Upstream is discussing ways to solve the issue properly, until then let's
|
|
||||||
# just not install the problematic files.
|
|
||||||
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
|
|
||||||
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
|
# 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
|
# style targets as they're only used when python is called with the -O or -OO options
|
||||||
# which is rare.
|
# which is rare.
|
||||||
|
|||||||
Reference in New Issue
Block a user