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
This commit is contained in:
Jeremy Cline 2024-07-03 14:39:39 -04:00
commit 143d2e3463
No known key found for this signature in database

View file

@ -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