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 2C26D158451 for ; Sun, 7 Jan 2024 17:11:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7B6032BC101; Sun, 7 Jan 2024 17:11:34 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2C7542BC0E1 for ; Sun, 7 Jan 2024 17:11:34 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] install-qa-check.d/60python-site: Check for deprecated .egg* files Date: Sun, 7 Jan 2024 18:11:29 +0100 Message-ID: <20240107171129.136991-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: ffa978fa-0755-48df-bfb9-03168f4443ab X-Archives-Hash: 8527012096eaeb544667ae0cf5c3547a 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 --- 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