Install both isympy and python3-isympy to comply with packaging standards.

Add -is-tangent patch (bz 1135677).
Temporarily disable tests that fail due to mpmath bugs (bz 1127796).
Fix license handling.
This commit is contained in:
Jerry James 2014-09-03 22:27:28 -06:00
parent 8562f02eab
commit bb69373beb
2 changed files with 46 additions and 10 deletions

View File

@ -0,0 +1,13 @@
--- ./sympy/geometry/ellipse.py.orig 2014-02-22 12:13:32.000000000 -0700
+++ ./sympy/geometry/ellipse.py 2014-09-03 12:30:00.000000000 -0600
@@ -768,8 +768,8 @@ class Ellipse(GeometryEntity):
inter = self.intersection(o)
if isinstance(inter, Ellipse):
return False
- return (inter is not None and isinstance(inter[0], Point)
- and len(inter) == 1)
+ return (inter is not None and len(inter) == 1 and
+ isinstance(inter[0], Point))
elif isinstance(o, LinearEntity):
inter = self._do_line_intersection(o)
if inter is not None and len(inter) == 1:

View File

@ -12,6 +12,8 @@ Patch0: %{name}-0.7.5-strip-internal-mpmath.patch
# see Unicode output. Until upstream fixes this, patch the test so that it
# expects Unicode output if Unicode output is active, otherwise ASCII output.
Patch1: %{name}-0.7.5-test.patch
# Fix a bug in ellipse.is_tangent (bz 1135677)
Patch2: %{name}-0.7.5-is-tangent.patch
BuildArch: noarch
BuildRequires: gcc-gfortran
@ -78,6 +80,7 @@ HTML documentation for sympy.
%setup -q
%patch0 -b .mpmath
%patch1
%patch2
rm -rf sympy/mpmath doc/src/modules/mpmath
rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath
@ -88,6 +91,12 @@ cp -a . %{py3dir}
mkdir -p doc/_build/html
cp -p doc/src/_static/sympylogo.png doc
# Workaround for mpmath brokenness (bz 1127796)
sed -e 's/import raises/&, XFAIL/' \
-e '/^def test_roots_preprocessed():/i@XFAIL' \
-i sympy/polys/tests/test_polyroots.py
sed -i '/^def test_nroots():/i@XFAIL' sympy/polys/tests/test_polytools.py
%build
# Build the python2 version
python2 setup.py build
@ -106,16 +115,20 @@ make cheatsheet
popd
%install
# Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
# Install the python3 version
pushd %{py3dir}
python3 setup.py install -O1 --skip-build --root %{buildroot}
sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{buildroot}%{_bindir}/isympy
mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy
ln -s isympy.1.gz %{buildroot}%{_mandir}/man1/python3-isympy.1.gz
popd
# Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
sed -i 's/env python/python2/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{buildroot}%{_bindir}/isympy
## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test
@ -146,19 +159,23 @@ xvfb-run -n $dnum python3 setup.py test
popd
%files
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%doc AUTHORS doc/_build/cheatsheet/cheatsheet.pdf
%license LICENSE
%{python2_sitelib}/sympy/
%{python2_sitelib}/sympy-%{version}-*.egg-info
%files -n python3-%{name}
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%files -n python3-%{name}
%doc AUTHORS doc/_build/cheatsheet/cheatsheet.pdf
%license LICENSE
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/python3-isympy
%{_mandir}/man1/python3-isympy.1*
%files texmacs
%doc data/TeXmacs/LICENSE
%license data/TeXmacs/LICENSE
%{_bindir}/tm_sympy
%{_datadir}/TeXmacs/plugins/sympy/
@ -170,6 +187,12 @@ popd
%{_docdir}/%{name}-doc/html
%changelog
* Wed Sep 3 2014 Jerry James <loganjeerry@gmail.com> - 0.7.5-3
- Install both isympy and python3-isympy to comply with packaging standards
- Add -is-tangent patch (bz 1135677)
- Temporarily disable tests that fail due to mpmath bugs (bz 1127796)
- Fix license handling
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild