Skip to content

Commit 1c3fffc

Browse files
rossburtonrpurdie
authored andcommitted
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] python/cpython#81777 [2] python/cpython@51999c9 Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 1f40891 commit 1c3fffc

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎meta/recipes-devtools/python/python3_3.13.2.bb‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -235,20 +235,6 @@ do_install:append() {
235235
$sysconfigfile
236236
cp $sysconfigfile ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
237237

238-
239-
# Unfortunately the following pyc files are non-deterministc due to 'frozenset'
240-
# being written without strict ordering, even with PYTHONHASHSEED = 0
241-
# Upstream is discussing ways to solve the issue properly, until then let's
242-
# just not install the problematic files.
243-
# More info: http://benno.id.au/blog/2013/01/15/python-determinism
244-
rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
245-
rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
246-
247-
# Similar to the above, we're getting reproducibility issues with
248-
# /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc
249-
# so remove it too
250-
rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython*
251-
252238
# Remove the opt-1.pyc and opt-2.pyc files. They effectively waste space on embedded
253239
# style targets as they're only used when python is called with the -O or -OO options
254240
# which is rare.

0 commit comments

Comments
 (0)