From 1a00222e572f9f22c049a4f92028bbfc3d111be0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: May 29 2020 22:04:05 +0000 Subject: Cannot use %ifnarch in a noarch package; check int size instead. --- diff --git a/sympy.spec b/sympy.spec index 77c4e79..cbc0626 100644 --- a/sympy.spec +++ b/sympy.spec @@ -134,19 +134,20 @@ rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n # Try to get rid of pyc files, which aren't useful for documentation find examples/ -name '*.py[co]' -print -delete +%check # Too many tests now assume that native 64-bit integers are available. # Do not run tests on 32-bit systems. -%ifnarch %{arm} %{ix86} -%check -let "dnum = $RANDOM % 90 + 10" -# Split into many small chunks to reduce waiting in the end-game -jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3)) - -xvfb-run -a -n $dnum \ - parallel %{?_smp_mflags} \ - %{__python3} bin/test -v --split {}/$jobs \ - ::: $(bash -c "echo {1..$jobs}") -%endif +%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)') +if [ "%{maxpyint}" != "7fffffff" ]; then + let "dnum = $RANDOM % 90 + 10" + # Split into many small chunks to reduce waiting in the end-game + jobs=%{?_smp_mflags}; jobs=${jobs#-j}; jobs=$((jobs * 3)) + + xvfb-run -a -n $dnum \ + parallel %{?_smp_mflags} \ + %{__python3} bin/test -v --split {}/$jobs \ + ::: $(bash -c "echo {1..$jobs}") +fi %files -n python3-%{name} %doc AUTHORS README.md