summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/isort')
-rw-r--r--dev-python/isort/files/isort-5.11.3-sitepkg-junk.patch35
-rw-r--r--dev-python/isort/isort-5.11.3-r1.ebuild (renamed from dev-python/isort/isort-5.11.3.ebuild)4
2 files changed, 39 insertions, 0 deletions
diff --git a/dev-python/isort/files/isort-5.11.3-sitepkg-junk.patch b/dev-python/isort/files/isort-5.11.3-sitepkg-junk.patch
new file mode 100644
index 000000000000..4843d330a89e
--- /dev/null
+++ b/dev-python/isort/files/isort-5.11.3-sitepkg-junk.patch
@@ -0,0 +1,35 @@
+From a6fdbfd7d82df63c49dcc01b98d25110c0ff4caf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 21 Dec 2022 10:36:42 +0100
+Subject: [PATCH] Stop installing documentation files to top-level
+ site-packages
+
+Add `format = sdist` to `include` table values to prevent
+the documentation files from being installed directly into
+site-packages, i.e.:
+
+ /usr/lib/python3.11/site-packages/CHANGELOG.md
+ /usr/lib/python3.11/site-packages/LICENSE
+
+Originally reported by Anna Vyalkova on https://bugs.gentoo.org/887569.
+---
+ pyproject.toml | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index eaeafb90..b0608a58 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -34,9 +34,9 @@ classifiers = [
+ urls = { Changelog = "https://github.com/pycqa/isort/blob/main/CHANGELOG.md" }
+ include = [
+ { path = "tests", format = "sdist" },
+- { path = "ACKNOWLEDGEMENTS.md" },
+- { path = "CHANGELOG.md" },
+- { path = "LICENSE" },
++ { path = "ACKNOWLEDGEMENTS.md", format = "sdist" },
++ { path = "CHANGELOG.md", format = "sdist" },
++ { path = "LICENSE", format = "sdist" },
+ ]
+
+ [tool.poetry.dependencies]
diff --git a/dev-python/isort/isort-5.11.3.ebuild b/dev-python/isort/isort-5.11.3-r1.ebuild
index 3a4a9ec195f1..42e02dc1b62f 100644
--- a/dev-python/isort/isort-5.11.3.ebuild
+++ b/dev-python/isort/isort-5.11.3-r1.ebuild
@@ -40,6 +40,10 @@ BDEPEND="
distutils_enable_tests pytest
src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-sitepkg-junk.patch
+ )
+
# unbundle tomli
sed -i -e 's:from ._vendored ::' isort/settings.py || die
rm -r isort/_vendored || die