]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3: Avoid installing test data into recipe-sysroot
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 27 Jan 2021 17:12:46 +0000 (17:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Jan 2021 23:09:29 +0000 (23:09 +0000)
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 <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3_3.9.1.bb

index 17d0c032f73f58954f21670fe61c9bf44a11acba..a89122f94943eaf690df549ceeffbb822a57f2ae 100644 (file)
@@ -372,3 +372,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
+}