summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2026-02-15 18:18:26 +0100
committerMichał Górny <mgorny@gentoo.org>2026-02-15 18:39:25 +0100
commit0d48cfdce689b091e1e9baa2d125256a4a77aacc (patch)
tree7946e8d38799d37c0fca951fcd3690c3f46630d5 /dev-python
parent990638df3f3d7e95cceff6be3038d9b2d560fba2 (diff)
downloadgentoo-0d48cfdce689b091e1e9baa2d125256a4a77aacc.tar.gz
gentoo-0d48cfdce689b091e1e9baa2d125256a4a77aacc.tar.bz2
gentoo-0d48cfdce689b091e1e9baa2d125256a4a77aacc.zip
dev-python/cryptography: Fix installing stray files
Closes: https://bugs.gentoo.org/970090 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/cryptography/cryptography-46.0.5.ebuild5
-rw-r--r--dev-python/cryptography/files/cryptography-46.0.5-stray-files.patch48
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-python/cryptography/cryptography-46.0.5.ebuild b/dev-python/cryptography/cryptography-46.0.5.ebuild
index ea8c2998c391..b6bb5899e185 100644
--- a/dev-python/cryptography/cryptography-46.0.5.ebuild
+++ b/dev-python/cryptography/cryptography-46.0.5.ebuild
@@ -104,6 +104,11 @@ EPYTEST_PLUGINS=( hypothesis pytest-subtests )
EPYTEST_XDIST=1
distutils_enable_tests pytest
+PATCHES=(
+ # https://github.com/pyca/cryptography/pull/14319
+ "${FILESDIR}/${PN}-46.0.5-stray-files.patch"
+)
+
src_unpack() {
if use verify-provenance; then
pypi_verify_provenance "${DISTDIR}/${P}.tar.gz"{,.provenance}
diff --git a/dev-python/cryptography/files/cryptography-46.0.5-stray-files.patch b/dev-python/cryptography/files/cryptography-46.0.5-stray-files.patch
new file mode 100644
index 000000000000..e13bb4f560c4
--- /dev/null
+++ b/dev-python/cryptography/files/cryptography-46.0.5-stray-files.patch
@@ -0,0 +1,48 @@
+From b89a7737e3f135333125b0984e75ea553a485203 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 15 Feb 2026 17:47:48 +0100
+Subject: [PATCH] Fix installing stray files into site-packages
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix the `include` pattern in `pyproject.toml` not to install stray files
+such as `CHANGELOG.rst`, `CONTRIBUTING.rst`, `docs` and `tests` straight
+into site-packages. Apparently Maturin did not install them before due
+to a bug, but it was fixed in maturin 1.12.0, leading to the files being
+suddenly installed.
+
+Originally reported as https://bugs.gentoo.org/970090.
+
+Signed-off-by: Michał Górny <mgorny@gentoo.org>
+---
+ pyproject.toml | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index e26b38628..8640cb6e5 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -106,10 +106,10 @@ module-name = "cryptography.hazmat.bindings._rust"
+ locked = true
+ sdist-generator = "git"
+ include = [
+- "CHANGELOG.rst",
+- "CONTRIBUTING.rst",
++ { path = "CHANGELOG.rst", format = "sdist" },
++ { path = "CONTRIBUTING.rst", format = "sdist" },
+
+- "docs/**/*",
++ { path = "docs/**/*", format = "sdist" },
+
+ { path = "src/_cffi_src/**/*.py", format = "sdist" },
+ { path = "src/_cffi_src/**/*.c", format = "sdist" },
+@@ -121,7 +121,7 @@ include = [
+ { path = "src/rust/**/Cargo.lock", format = "sdist" },
+ { path = "src/rust/**/*.rs", format = "sdist" },
+
+- "tests/**/*.py",
++ { path = "tests/**/*.py", format = "sdist" },
+ ]
+ exclude = [
+ "vectors/**/*",