summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-01-22 13:16:17 +0100
committerMichał Górny <mgorny@gentoo.org>2022-01-23 10:18:50 +0100
commit1ceb985e433b865d655d6988497ea6ee766d0bfe (patch)
tree3fe11548b251067b44a44202e554e5e3b5018689 /eclass
parentsys-kernel/pf-sources: add 5.15.{14..16} patches for CAP_SYS_ADMIN (diff)
downloadgentoo-1ceb985e433b865d655d6988497ea6ee766d0bfe.tar.gz
gentoo-1ceb985e433b865d655d6988497ea6ee766d0bfe.tar.bz2
gentoo-1ceb985e433b865d655d6988497ea6ee766d0bfe.zip
distutils-r1.eclass: Strip LICENSE* & COPYING* from PEP517 dist-info
The .dist-info metadata installed by PEP517 packages contains a full copy of the license. Strip that following the Gentoo policy. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index a9c86ef55124..f2804defb818 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -977,6 +977,11 @@ distutils-r1_python_compile() {
chmod +x "${root}"/usr/bin/* || die
fi
+ # remove installed licenses
+ find "${root}$(python_get_sitedir)" \
+ '(' -path '*.dist-info/COPYING*' -o \
+ -path '*.dist-info/LICENSE*' ')' -delete || die
+
# clean the build tree; otherwise we may end up with PyPy3
# extensions duplicated into CPython dists
if [[ ${DISTUTILS_USE_PEP517:-setuptools} == setuptools ]]; then