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

