public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 1/9] install-qa-check.d: Generalize 60python-{pyc → site}
Date: Sat,  6 Jan 2024 14:44:38 +0100	[thread overview]
Message-ID: <20240106134446.26153-1-mgorny@gentoo.org> (raw)

Rename `60python-pyc` check to `60python-site`, as it will be used
to perform other checks on the site-packages directory.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 .../{60python-pyc => 60python-site}           | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
 rename metadata/install-qa-check.d/{60python-pyc => 60python-site} (86%)

diff --git a/metadata/install-qa-check.d/60python-pyc b/metadata/install-qa-check.d/60python-site
similarity index 86%
rename from metadata/install-qa-check.d/60python-pyc
rename to metadata/install-qa-check.d/60python-site
index fe4f3f62c4ef..5f812ecd01e1 100644
--- a/metadata/install-qa-check.d/60python-pyc
+++ b/metadata/install-qa-check.d/60python-site
@@ -1,10 +1,11 @@
-# Copyright 2019-2022 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-# QA check: ensure that Python modules are compiled after installing
+# QA checks related to site-packages directory:
+# - missing, mismatched or stray .pyc files
 # Maintainer: Python project <python@gentoo.org>
 
-python_pyc_check() {
+python_site_check() {
 	local save=$(shopt -p nullglob)
 	shopt -s nullglob
 	local progs=( "${EPREFIX}"/usr/lib/python-exec/*/gpep517 )
@@ -69,7 +70,7 @@ python_pyc_check() {
 		eqawarn "not byte-compiled."
 		eqawarn "The following files are missing:"
 		eqawarn
-		eqatag -v python-pyc.missing "${missing[@]}"
+		eqatag -v python-site.pyc.missing "${missing[@]}"
 		found=1
 	fi
 
@@ -79,7 +80,7 @@ python_pyc_check() {
 		eqawarn "that seem to be invalid (do not have the correct header)."
 		eqawarn "The following files are invalid:"
 		eqawarn
-		eqatag -v python-pyc.invalid "${invalid[@]}"
+		eqatag -v python-site.pyc.invalid "${invalid[@]}"
 		found=1
 	fi
 
@@ -88,7 +89,7 @@ python_pyc_check() {
 		eqawarn "QA Notice: This package installs one or more compiled Python modules whose"
 		eqawarn ".py files have different content (size or hash) than recorded:"
 		eqawarn
-		eqatag -v python-pyc.mismatched.data "${mismatched_data[@]}"
+		eqatag -v python-site.pyc.mismatched.data "${mismatched_data[@]}"
 		found=1
 	fi
 
@@ -97,7 +98,7 @@ python_pyc_check() {
 		eqawarn "QA Notice: This package installs one or more compiled Python modules whose"
 		eqawarn ".py files have different timestamps than recorded:"
 		eqawarn
-		eqatag -v python-pyc.mismatched.timestamp "${mismatched_timestamp[@]}"
+		eqatag -v python-site.pyc.mismatched.timestamp "${mismatched_timestamp[@]}"
 		found=1
 	fi
 
@@ -107,7 +108,7 @@ python_pyc_check() {
 		eqawarn "that do not match installed modules (or their implementation)."
 		eqawarn "The following files are stray:"
 		eqawarn
-		eqatag -v python-pyc.stray "${stray[@]}"
+		eqatag -v python-site.pyc.stray "${stray[@]}"
 		found=1
 	fi
 
@@ -118,7 +119,7 @@ python_pyc_check() {
 	fi
 }
 
-python_pyc_check
+python_site_check
 
 : # guarantee successful exit
 
-- 
2.43.0



             reply	other threads:[~2024-01-06 13:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06 13:44 Michał Górny [this message]
2024-01-06 13:44 ` [gentoo-dev] [PATCH 2/9] install-qa-check.d/60python-site: Add invalid site-packages check Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 3/9] distutils-r1.eclass: Stray file check moved to install-qa-check.d Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 4/9] install-qa-check.d/60python-site: Add bad version check Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 5/9] install-qa-check.d/60python-site: Forbid lib & usr package names Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 6/9] install-qa-check.d/60python-site: Add check for wrong libdir Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 7/9] install-qa-check.d/60python-site: Check for UNKNOWN package name Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 8/9] install-qa-check.d/60python-site: Check for out-of-sitepkg install Michał Górny
2024-01-06 13:44 ` [gentoo-dev] [PATCH 9/9] install-qa-check.d/60python-site: allow site-packages/README.txt Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240106134446.26153-1-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox