python3: Drop opt1 and opt2 pyc files from target

These are only used with python when the -O or -OO options are passed
and I'm not aware of runtime use of that. They otherwise just waste a
ton of space.

(From OE-Core rev: 5ac7b8c030daf30b2be93abebfedbc36c395e6d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-03-03 16:33:40 +00:00
parent ed2ba22d10
commit 345ed4cc9d

View File

@@ -189,6 +189,11 @@ do_install:append() {
# 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*
# 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.
find ${D} -name *opt-*.pyc -delete
}
do_install:append:class-nativesdk () {