python3: Restore .py source files
Due to PEP 3147, an earlier commit which removes .py files on rootfs
broke python since .pyc files have been moved to a new directory called
__pycache__ and hence no modules can be imported. This reverts those
changes.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I1defada46d5e31ddd5ddc43dfa718e2e10eb505b
diff --git a/recipes-devtools/python/python3_%.bbappend b/recipes-devtools/python/python3_%.bbappend
index 69f4e9a..324b28c 100644
--- a/recipes-devtools/python/python3_%.bbappend
+++ b/recipes-devtools/python/python3_%.bbappend
@@ -10,11 +10,4 @@
# Even though python3 is built with --without-ensurepip, it still installs
# a large, compressed version of pip. Remove it to free up the space.
rm -rf ${D}${libdir}/python${PYTHON_MAJMIN}/ensurepip
-
- # Remove all python .py files from python recipe. Only the .pyc
- # files are required.
- # The _sysconfigdata*.py files are system configuration files generated
- # during build time. It's used in the yocto packaging process so
- # it is required to remain in the image.
- find ${D}${libdir}/python${PYTHON_MAJMIN} -name \*.py ! -name _sysconfigdata*.py -exec rm {} \;
}