Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
metadata/install-qa-check.d/60python-site | 28 ++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site
index 26f26d6cc527..cb31c7f98e08 100644
--- a/metadata/install-qa-check.d/60python-site
+++ b/metadata/install-qa-check.d/60python-site
@@ -31,6 +31,7 @@ python_site_check() {
local stray=()
local bad_versions=()
+ local outside_site=()
local stray_packages=()
# Avoid running the check if sufficiently new gpep517 is not installed @@ -46,7 +47,24 @@ python_site_check() {
impl=${impl##*/}
# NB: using ${impl}* to catch pypy3.* for pypy3
- local sitedir=( "${ED}"/usr/lib/${impl}*/site-packages )
+ local pydir=( "${ED}"/usr/lib/${impl}* )
+ [[ -d ${pydir} ]] || continue
+
+ # check for packages installing outside site-packages
+ case ${CATEGORY}/${PN} in
+ dev-lang/python|dev-python/pypy*)
+ ;;
+ *)
+ while IFS= read -d $'\0' -r f; d