diff --git a/python-cramjam.spec b/python-cramjam.spec index f179f39..1a226e6 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,5 +1,8 @@ %bcond tests 1 +# isa-l is ExcludeArch: i686 +%bcond isal %[ 0%{?__isa_bits} != 32 ] + Name: python-cramjam Version: 2.9.1 Release: %autorelease @@ -34,9 +37,6 @@ Source1: get_source # https://github.com/milesgranger/cramjam/pull/196 Patch: %{url}/pull/196.patch -# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: %{ix86} - BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 @@ -113,6 +113,20 @@ done # unavailable blosc2 crate feature. tomcli set Cargo.toml del 'features.wasm32-compat' +%if %{without isal} +tomcli set Cargo.toml lists delitem --type regex \ + 'features.default' 'i(gzip|deflate|zlib)' +isal_features="$( + tomcli get Cargo.toml features -F newline-keys | + grep -E '^i(gzip|deflate|zlib)|-isal-' | + tr '\n' ' ' +)" +for sf in ${isal_features} +do + tomcli set Cargo.toml del "features.${sf}" +done +%endif + %cargo_prep