Fix dependency on python2 from python3 package (bz 1471886).

This commit is contained in:
Jerry James 2017-07-24 22:02:26 -06:00
parent 8855bbb9d0
commit 7c17afb9b6

View File

@ -1,6 +1,6 @@
Name: sympy
Version: 1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: http://sympy.org/
@ -96,13 +96,6 @@ HTML documentation for sympy.
%setup -q -c
%patch0
# Do not depend on env
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" .); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env ,\1,' $fil
touch -r $fil.orig $fil
rm -f $fil.orig
done
# If running on a 32-bit system, disable a test that requires 64-bit integers.
%global maxpyint %(python3 -c 'import sys;print("%x" % sys.maxsize)')
if [ "%{maxpyint}" = "7fffffff" ]; then
@ -113,6 +106,18 @@ fi
# Make a copy for building the python3 version
cp -a %{sympydir} python3
# Do not depend on env
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" %{sympydir}); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python2,' $fil
touch -r $fil.orig $fil
rm -f $fil.orig
done
for fil in $(grep -rl "^#\![[:blank:]]*%{_bindir}/env" python3); do
sed -i.orig 's,^\(#\![[:blank:]]*%{_bindir}/\)env python,\1python3,' $fil
touch -r $fil.orig $fil
rm -f $fil.orig
done
%build
# Build the python2 version
pushd %{sympydir}
@ -236,6 +241,9 @@ popd
%{_docdir}/%{name}-doc/html
%changelog
* Mon Jul 24 2017 Jerry James <loganjerry@gmail.com> - 1.1-3
- Fix dependency on python2 from python3 package (bz 1471886)
* Sat Jul 8 2017 Jerry James <loganjerry@gmail.com> - 1.1-2
- Disable tests that fail due to overflow on some 32-bit architectures