Add a QA check for Python extensions that were compiled for the wrong implementation. This is particularly a case when build is not properly isolated and extensions built for earlier Python versions end up
being included in the subsequent installs.
Signed-off-by: Michał Górny <
mgorny@gentoo.org>
---
metadata/install-qa-check.d/60python-site | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site
index cd58fa3a5937..f0c2c14cc935 100644
--- a/metadata/install-qa-check.d/60python-site
+++ b/metadata/install-qa-check.d/60python-site
@@ -34,6 +34,7 @@ python_site_check() {
local eggs=()
local outside_site=()
local stray_packages=()
+ local wrong_ext=()
# Avoid running the check if sufficiently new gpep517 is not installed
# yet. It's valid to schedule (for merge order) >=gpep517-8 after
@@ -104,6 +105,7 @@ python_site_check() {
-name 'README.txt' \
')' -print0
)
+
# check for forbidden packages
for f in "${forbidden_package_names[@]}"; do
[[ -d ${sitedir}/${f} ]] && stray_packages+=(
@@ -111,6 +113,22 @@ python_site_check() {
)
done
+ # check for extensions compiled for wrong implementations
+ local ext_suffix=$(
+ "${impl}