From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH] install-qa-check.d/60python-site: Check for deprecated .egg* files
Date: Sun, 7 Jan 2024 18:11:29 +0100 [thread overview]
Message-ID: <20240107171129.136991-1-mgorny@gentoo.org> (raw)
Check for deprecated .egg and .egg-info files. While at it, fix stray
file check not to barf on *.egg files.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
metadata/install-qa-check.d/60python-site | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site
index afef445ad715..e4748b75fdfe 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 eggs=()
local outside_site=()
local stray_packages=()
@@ -79,11 +80,22 @@ python_site_check() {
')' -print0
)
+ # check for deprecated egg format
+ while IFS= read -d $'\0' -r f; do
+ eggs+=( "${f#${ED}}" )
+ done < <(
+ find "${sitedir}" -maxdepth 1 '(' \
+ -name '*.egg-info' -o \
+ -name '*.egg' \
+ ')' -print0
+ )
+
# check for stray files in site-packages
while IFS= read -d $'\0' -r f; do
stray_packages+=( "${f#${ED}}" )
done < <(
find "${sitedir}" -maxdepth 1 -type f '!' '(' \
+ -name '*.egg' -o \
-name '*.egg-info' -o \
-name '*.pth' -o \
-name '*.py' -o \
@@ -194,6 +206,14 @@ python_site_check() {
eqatag -v python-site.bad_version "${bad_versions[@]}"
fi
+ if [[ ${eggs[@]} ]]; then
+ eqawarn
+ eqawarn "QA Notice: The following deprecated .egg or .egg-info files were found."
+ eqawarn "Please migrate the ebuild to use the PEP517 build."
+ eqawarn
+ eqatag -v python-site.egg "${eggs[@]}"
+ fi
+
if [[ ${stray_packages[@]} ]]; then
eqawarn
eqawarn "QA Notice: The following unexpected files/directories were found"
--
2.43.0
reply other threads:[~2024-01-07 17:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240107171129.136991-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