From 143d2e3463f824c20b62b8c73688bdf950b2893d Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Wed, 3 Jul 2024 14:39:39 -0400 Subject: [PATCH] Fix the build for ELN PyO3 doesn't support Python 3.13 until 0.22, but cryptography 0.42 is using 0.20 at the moment. Use ABI3 forward compatibility for ELN builds until cryptography updates. The Rawhide build is using crates from the distro which must be setting this in some way, but I'm not familiar enough with PyO3 or Fedora's Rust packaging to find it quickly. Fixes rhbz#2295602 --- python-cryptography.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-cryptography.spec b/python-cryptography.spec index 3670a2a..e6fe8cd 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -98,6 +98,11 @@ cd ../.. %build export RUSTFLAGS="%build_rustflags" export OPENSSL_NO_VENDOR=1 +# Temporary work-around for using pyo3 0.20 with Python 3.13 on ELN; This can +# be dropped when a cryptography release bumps to pyo3 >= 0.22 +%if 0%{?rhel} +export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 +%endif %pyproject_wheel