From: Deepak Rathore <[email protected]>
Maturin 1.12 changed the handling of include entries from
pyproject.toml. With the current cryptography metadata, files like
CHANGELOG.rst, CONTRIBUTING.rst, docs and tests can be installed under
site-packages instead of being kept only in the source archive.
That can cause image install conflicts when packages such as
python3-pyrad and python3-pyexpect are installed with
python3-cryptography, because those packages also install top-level docs
or tests directories under site-packages.
Backport the upstream cryptography fix which marks these entries as
sdist-only. The files remain available from the source tree, so the
existing ptest install path which copies tests from ${S} is not changed.
Signed-off-by: Deepak Rathore <[email protected]>
---
.../python/python3-cryptography.bb | 1 +
...lling-stray-files-into-site-packages.patch | 55 +++++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644
meta/recipes-devtools/python/python3-cryptography/0002-Fix-installing-stray-files-into-site-packages.patch
diff --git a/meta/recipes-devtools/python/python3-cryptography.bb
b/meta/recipes-devtools/python/python3-cryptography.bb
index 42e8c5ff19..b73123d361 100644
--- a/meta/recipes-devtools/python/python3-cryptography.bb
+++ b/meta/recipes-devtools/python/python3-cryptography.bb
@@ -14,6 +14,7 @@ require python3-cryptography-common.inc
SRC_URI[sha256sum] =
"abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d"
SRC_URI += "file://0001-pyproject.toml-remove-benchmark-disable-option.patch \
+ file://0002-Fix-installing-stray-files-into-site-packages.patch \
file://check-memfree.py \
file://run-ptest \
"
diff --git
a/meta/recipes-devtools/python/python3-cryptography/0002-Fix-installing-stray-files-into-site-packages.patch
b/meta/recipes-devtools/python/python3-cryptography/0002-Fix-installing-stray-files-into-site-packages.patch
new file mode 100644
index 0000000000..6212c1a43e
--- /dev/null
+++
b/meta/recipes-devtools/python/python3-cryptography/0002-Fix-installing-stray-files-into-site-packages.patch
@@ -0,0 +1,55 @@
+From af53f00da0538e7d64625eea9f4ec850a2b7dd2e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
+Date: Sun, 15 Feb 2026 18:01:37 +0100
+Subject: [PATCH] Fix installing stray files into site-packages (#14319)
+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.
+
+Upstream-Status: Backport
[https://github.com/pyca/cryptography/commit/43eb178ee3aae8d0060221118437b03c23570a41]
+
+Signed-off-by: Michał Górny <[email protected]>
+(cherry picked from commit 43eb178ee3aae8d0060221118437b03c23570a41)
+Signed-off-by: Deepak Rathore <[email protected]>
+---
+ pyproject.toml | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 75bfcbb94..8ee43d17a 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/**/*",
+--
+2.35.6
+
--
2.35.6
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#243844):
https://lists.openembedded.org/g/openembedded-core/message/243844
Mute This Topic: https://lists.openembedded.org/mt/120827695/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-