Python site-packages/test directories should be reported as an error
Many upstream Python packages accidentally install things to site-packages/tests (without any package namespacing) in error. These should be flagged as an error.
The "easy" fix in package()
is to nuke them (and report the problem upstream):
local _pyver=$(python --version | cut -d " " -f2)
rm -r "$pkgdir/usr/lib/python${_pyver%.*}/site-packages/tests"
Edited by Caleb Maclennan