From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF26F15846A for ; Mon, 8 Jan 2024 14:48:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E18C62BC056; Mon, 8 Jan 2024 14:48:34 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CB94D2BC056 for ; Mon, 8 Jan 2024 14:48:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7D841343338 for ; Mon, 8 Jan 2024 14:48:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DCD7C14C4 for ; Mon, 8 Jan 2024 14:48:30 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1704725302.5b51bdf96d62a2c54460f67de6b8299e63b83e97.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/install-qa-check.d/ X-VCS-Repository: repo/gentoo X-VCS-Files: metadata/install-qa-check.d/60python-site X-VCS-Directories: metadata/install-qa-check.d/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 5b51bdf96d62a2c54460f67de6b8299e63b83e97 X-VCS-Branch: master Date: Mon, 8 Jan 2024 14:48:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ba47e248-21bb-49a8-8363-b94372e2d6d4 X-Archives-Hash: ae8068683d21ff754b8bf820ccf7fffa commit: 5b51bdf96d62a2c54460f67de6b8299e63b83e97 Author: Michał Górny gentoo org> AuthorDate: Sun Jan 7 17:10:55 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Jan 8 14:48:22 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b51bdf9 install-qa-check.d/60python-site: Check for deprecated .egg* files 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 gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34660 Signed-off-by: Michał Górny 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 b130b6768dad..a0a0f4370db2 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"