* [gentoo-commits] repo/gentoo:master commit in: dev-python/bcrypt/, dev-python/bcrypt/files/
@ 2024-10-05 9:44 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-10-05 9:44 UTC (permalink / raw
To: gentoo-commits
commit: c83cd4e9b83b828d9a4a29391de31ae7c798a40a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 5 09:41:43 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 5 09:44:01 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83cd4e9
dev-python/bcrypt: patch pyo3 crate
Bug: https://bugs.gentoo.org/920906
Fixes: 88f355bfa33622b26d1a9d958e1593527cf3dc97
Signed-off-by: Sam James <sam <AT> gentoo.org>
...rypt-4.2.0-r1.ebuild => bcrypt-4.2.0-r2.ebuild} | 7 +++++++
.../files/bcrypt-4.2.0-patch-pyo3-subinterp.patch | 23 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild b/dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild
similarity index 92%
rename from dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild
rename to dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild
index 4dbf28e070d9..7399455166ac 100644
--- a/dev-python/bcrypt/bcrypt-4.2.0-r1.ebuild
+++ b/dev-python/bcrypt/bcrypt-4.2.0-r2.ebuild
@@ -77,6 +77,13 @@ distutils_enable_tests pytest
export UNSAFE_PYO3_SKIP_VERSION_CHECK=1
+src_prepare() {
+ distutils-r1_src_prepare
+
+ cd "${ECARGO_VENDOR}"/pyo3-0*/ || die
+ eapply "${FILESDIR}/bcrypt-4.2.0-patch-pyo3-subinterp.patch"
+}
+
python_configure_all() {
# Workaround for sys-cluster/ceph (bug #920906)
# https://github.com/pyca/bcrypt/issues/694
diff --git a/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch b/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch
new file mode 100644
index 000000000000..964dd964fa93
--- /dev/null
+++ b/dev-python/bcrypt/files/bcrypt-4.2.0-patch-pyo3-subinterp.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/920906
+https://github.com/pyca/bcrypt/issues/694
+https://github.com/PyO3/pyo3/issues/3451
+https://src.fedoraproject.org/rpms/rust-pyo3/raw/rawhide/f/0001-Make-unsafe-subinterpreter-support-available-via-cfg.patch
+
+From d59176bc05aa37838fd4a8dd253f47c962f61118 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Tue, 23 Jul 2024 14:41:04 +0200
+Subject: [PATCH] Make unsafe subinterpreter support available via cfg flag
+
+--- a/src/impl_/pymodule.rs
++++ b/src/impl_/pymodule.rs
+@@ -107,7 +107,7 @@ impl ModuleDef {
+ // that static data is not reused across interpreters.
+ //
+ // PyPy does not have subinterpreters, so no need to check interpreter ID.
+- #[cfg(not(any(PyPy, GraalPy)))]
++ #[cfg(not(any(PyPy, GraalPy, pyo3_unsafe_allow_subinterpreters)))]
+ {
+ // PyInterpreterState_Get is only available on 3.9 and later, but is missing
+ // from python3.dll for Windows stable API on 3.9
+--
+2.45.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-05 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05 9:44 [gentoo-commits] repo/gentoo:master commit in: dev-python/bcrypt/, dev-python/bcrypt/files/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox