diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-01-07 18:10:55 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-08 15:48:22 +0100 |
commit | 5b51bdf96d62a2c54460f67de6b8299e63b83e97 (patch) | |
tree | 2a5b7e65a37e0db36354647afb75b8a026f607df /metadata | |
parent | install-qa-check.d/60python-site: allow site-packages/README.txt (diff) | |
download | gentoo-5b51bdf96d62a2c54460f67de6b8299e63b83e97.tar.gz gentoo-5b51bdf96d62a2c54460f67de6b8299e63b83e97.tar.bz2 gentoo-5b51bdf96d62a2c54460f67de6b8299e63b83e97.zip |
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 <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34660
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/install-qa-check.d/60python-site | 20 |
1 files changed, 20 insertions, 0 deletions
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" |