From 653f8b1a8adf59d924028bfc69ead1c7437de11e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 27 Jan 2021 17:12:46 +0000 Subject: python3: Avoid installing test data into recipe-sysroot There are several thousand files in the test directory which we don't need. Adding these for the native and target sysroots is a crazy amount of files to be throwing around needlessly. Delete the files from the sysroot side of things to tidy up the sysroots and improve performance. Signed-off-by: Richard Purdie (cherry picked from commit f6bced03011ad1663d68b0322a2f8aeb4d836646) Signed-off-by: Anuj Mittal --- meta/recipes-devtools/python/python3_3.8.5.bb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta/recipes-devtools') diff --git a/meta/recipes-devtools/python/python3_3.8.5.bb b/meta/recipes-devtools/python/python3_3.8.5.bb index 0e588d7e4c..fb066084bf 100644 --- a/meta/recipes-devtools/python/python3_3.8.5.bb +++ b/meta/recipes-devtools/python/python3_3.8.5.bb @@ -361,3 +361,9 @@ RDEPENDS_${PN}-dev = "" RDEPENDS_${PN}-tests_append_class-target = " ${MLPREFIX}bash" RDEPENDS_${PN}-tests_append_class-nativesdk = " ${MLPREFIX}bash" + +# Python's tests contain large numbers of files we don't need in the recipe sysroots +SYSROOT_PREPROCESS_FUNCS += " py3_sysroot_cleanup" +py3_sysroot_cleanup () { + rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test +} -- cgit 1.2.3-korg