aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/python/python_2.7.18.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-15 10:29:50 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2021-02-16 19:22:26 +0100
commit8dce5b3e16cd58be72e4df429a1b683ef199b43c (patch)
treeeb390865ad115269e356bf009635e2f1155a43e6 /recipes-devtools/python/python_2.7.18.bb
parent68b1eceb3de5b6e1d7fd7e0cbb9be42fb316da86 (diff)
downloadmeta-python2-8dce5b3e16cd58be72e4df429a1b683ef199b43c.tar.gz
python: 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. (From OE-Core rev: f73ac290617e89b80e10dc700c0e90efddc8e1b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f6bced03011ad1663d68b0322a2f8aeb4d836646) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python_2.7.18.bb')
-rw-r--r--recipes-devtools/python/python_2.7.18.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-devtools/python/python_2.7.18.bb b/recipes-devtools/python/python_2.7.18.bb
index c28c010..658671f 100644
--- a/recipes-devtools/python/python_2.7.18.bb
+++ b/recipes-devtools/python/python_2.7.18.bb
@@ -258,3 +258,9 @@ addtask do_create_manifest
# Make sure we have native python ready when we create a new manifest
do_create_manifest[depends] += "${PN}:do_prepare_recipe_sysroot"
do_create_manifest[depends] += "${PN}:do_patch"
+
+# Python's tests contain large numbers of files we don't need in the recipe sysroots
+SYSROOT_PREPROCESS_FUNCS += " py_sysroot_cleanup"
+py_sysroot_cleanup () {
+ rm -rf ${SYSROOT_DESTDIR}${libdir}/python${PYTHON_MAJMIN}/test
+}