Cannot use %ifnarch in a noarch package; check int size instead.

This commit is contained in:
Jerry James 2020-05-29 16:04:05 -06:00
parent 655cd53030
commit 1a00222e57
1 changed files with 11 additions and 10 deletions

View File

@ -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))
%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}")
%endif
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