summaryrefslogtreecommitdiff
path: root/dev-python/ftfy/files/ftfy-6.2.0-poetry.patch
blob: 1766a9aa98b97b6a6e40663ec7ffb9da68e4f0f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 4ef6eeef8764086816034992705d4a4ebba4e88c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 3 Apr 2024 10:33:02 +0200
Subject: [PATCH] fix pyproject.toml not to install stray files into
 site-packages

Fix the `include` directives in `pyproject.toml` to include the relevant
files in `sdist` archives only and not in wheels, where they end up
being installed straight into site-packages, e.g. as:

    /usr/lib/python3.12/site-packages/CHANGELOG.md
    /usr/lib/python3.12/site-packages/README.md
---
 pyproject.toml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index fc3e6b9..3bc68e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,11 @@ version = "6.2.0"
 description = "Fixes mojibake and other problems with Unicode, after the fact"
 authors = ["Robyn Speer <rspeer@arborelia.net>"]
 license = "Apache-2.0"
-include = ["README.md", "CHANGELOG.md", "tests"]
+include = [
+    {path = "README.md", format = "sdist"},
+    {path = "CHANGELOG.md", format = "sdist"},
+    {path = "tests", format = "sdist"},
+]
 readme = "README.md"
 
 [tool.poetry.dependencies]
-- 
2.44.0