From c6f726257a32e008a0dac65748647831b16f113c Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 26 Jan 2023 20:53:08 +0000 Subject: [PATCH] ensure correct compiler flags are used for Rust code --- python-cryptography.spec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/python-cryptography.spec b/python-cryptography.spec index a0c880e..5055a5b 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -6,7 +6,7 @@ Name: python-%{srcname} Version: 37.0.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: PyCA's cryptography library # cryptography is dual licensed under the Apache-2.0 and BSD-3-Clause, @@ -34,8 +34,6 @@ BuildRequires: python%{python3_pkgversion}-cffi >= 1.7 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-setuptools-rust >= 0.11.3 -# Cargo.toml requires asn1 0.6, but package FTBFS with 0.6.1 -BuildRequires: rust-asn1-devel >= 0.6.4 %if %{with tests} %if 0%{?fedora} @@ -70,22 +68,24 @@ recipes to Python developers. %prep %autosetup -p1 -n %{srcname}-%{version} - -%generate_buildrequires - %if 0%{?fedora} -# Fedora: use cargo macros to make use of RPMified crates %cargo_prep -cd src/rust -rm -f Cargo.lock -%cargo_generate_buildrequires -cd ../.. +rm src/rust/Cargo.lock %else # RHEL: use vendored Rust crates %cargo_prep -V 1 %endif +%generate_buildrequires +%if 0%{?fedora} +# Fedora: use RPMified crates +cd src/rust +%cargo_generate_buildrequires +cd ../.. +%endif + %build +export RUSTFLAGS="%build_rustflags" %py3_build %install @@ -125,6 +125,9 @@ PYTHONPATH=${PWD}/vectors:%{buildroot}%{python3_sitearch} \ %{python3_sitearch}/%{srcname}-%{version}-py*.egg-info %changelog +* Thu Jan 26 2023 Fabio Valentini - 37.0.2-8 +- Ensure correct compiler flags are used for Rust code. + * Fri Jan 20 2023 Fedora Release Engineering - 37.0.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild