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

Add -is-tangent patch (bz 1135677).
This commit is contained in:
Jerry James 2014-09-10 21:19:33 -06:00
parent 19cf7ea2fb
commit 08952c4df3
2 changed files with 36 additions and 9 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

@ -1,6 +1,6 @@
Name: sympy Name: sympy
Version: 0.7.5 Version: 0.7.5
Release: 1%{?dist} Release: 2%{?dist}
Summary: A Python library for symbolic mathematics Summary: A Python library for symbolic mathematics
License: BSD License: BSD
URL: http://sympy.org/ URL: http://sympy.org/
@ -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 # see Unicode output. Until upstream fixes this, patch the test so that it
# expects Unicode output if Unicode output is active, otherwise ASCII output. # expects Unicode output if Unicode output is active, otherwise ASCII output.
Patch1: %{name}-0.7.5-test.patch 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 BuildArch: noarch
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
@ -78,16 +80,18 @@ HTML documentation for sympy.
%setup -q %setup -q
%patch0 -b .mpmath %patch0 -b .mpmath
%patch1 %patch1
%patch2
rm -rf sympy/mpmath doc/src/modules/mpmath rm -rf sympy/mpmath doc/src/modules/mpmath
rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath
# Make a copy for building the python3 version
cp -a . %{py3dir}
# Workaround for bz 1075826. Remove this when that bug is resolved. # Workaround for bz 1075826. Remove this when that bug is resolved.
mkdir -p doc/_build/html mkdir -p doc/_build/html
cp -p doc/src/_static/sympylogo.png doc cp -p doc/src/_static/sympylogo.png doc
# Make a copy for building the python3 version
rm -rf %{py3dir}
cp -a . %{py3dir}
%build %build
# Build the python2 version # Build the python2 version
python2 setup.py build python2 setup.py build
@ -106,16 +110,20 @@ make cheatsheet
popd popd
%install %install
# Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
# Install the python3 version # Install the python3 version
pushd %{py3dir} pushd %{py3dir}
python3 setup.py install -O1 --skip-build --root %{buildroot} python3 setup.py install -O1 --skip-build --root %{buildroot}
sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy sed -i 's/env python/python3/' %{buildroot}%{_bindir}/isympy
touch -r bin/isympy %{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 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 ## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test rm -f %{buildroot}%{_bindir}/{,doc}test
@ -149,13 +157,15 @@ popd
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%{python2_sitelib}/sympy/ %{python2_sitelib}/sympy/
%{python2_sitelib}/sympy-%{version}-*.egg-info %{python2_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%files -n python3-%{name} %files -n python3-%{name}
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%{python3_sitelib}/sympy/ %{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info %{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy %{_bindir}/python3-isympy
%{_mandir}/man1/isympy.1* %{_mandir}/man1/python3-isympy.1*
%files texmacs %files texmacs
%doc data/TeXmacs/LICENSE %doc data/TeXmacs/LICENSE
@ -170,6 +180,10 @@ popd
%{_docdir}/%{name}-doc/html %{_docdir}/%{name}-doc/html
%changelog %changelog
* Wed Sep 10 2014 Jerry James <loganjerry@gmail.com> - 0.7.5-2
- Install both isympy and python3-isympy to comply with packaging standards
- Add -is-tangent patch (bz 1135677)
* Thu Mar 13 2014 Jerry James <loganjerry@gmail.com> - 0.7.5-1 * Thu Mar 13 2014 Jerry James <loganjerry@gmail.com> - 0.7.5-1
- Update to 0.7.5 (bz 1066951) - Update to 0.7.5 (bz 1066951)
- Binaries now default to using python3 - Binaries now default to using python3