Compare commits

...

3 Commits

Author SHA1 Message Date
Orion Poplawski 129838e3ae No python3 in EPEL 2015-06-24 15:53:48 -06:00
Susi Lehtola 4d3fd930d0 Conditionalize Recommends. 2015-05-22 21:10:37 +02:00
Susi Lehtola a82a8612ba Conditionalize Recommends. 2015-05-22 21:08:30 +02:00
1 changed files with 49 additions and 9 deletions

View File

@ -1,6 +1,10 @@
%if 0%{?fedora}
%global with_python3 1
%endif
Name: sympy
Version: 0.7.6
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: http://sympy.org/
@ -15,15 +19,25 @@ BuildRequires: gettext
BuildRequires: graphviz
BuildRequires: ImageMagick
BuildRequires: librsvg2-tools
BuildRequires: numpy python3-numpy
BuildRequires: numpy-f2py python3-numpy-f2py
BuildRequires: python2-devel python3-devel
BuildRequires: python-fastcache python3-fastcache
BuildRequires: python-gmpy2 python3-gmpy2
BuildRequires: python-matplotlib python3-matplotlib
BuildRequires: python-mpmath python3-mpmath
BuildRequires: numpy
BuildRequires: numpy-f2py
BuildRequires: python2-devel
BuildRequires: python-fastcache
BuildRequires: python-gmpy2
BuildRequires: python-matplotlib
BuildRequires: python-mpmath
BuildRequires: python-sphinx
BuildRequires: scipy python3-scipy
BuildRequires: scipy
%if 0%{?with_python3}
BuildRequires: python3-numpy
BuildRequires: python3-numpy-f2py
BuildRequires: python3-devel
BuildRequires: python3-fastcache
BuildRequires: python3-gmpy2
BuildRequires: python3-matplotlib
BuildRequires: python3-mpmath
BuildRequires: python3-scipy
%endif
BuildRequires: tex(latex)
BuildRequires: tex-dvipng
BuildRequires: xorg-x11-fonts-Type1
@ -35,7 +49,9 @@ Requires: python-matplotlib
Requires: python-mpmath
Requires: python-pyglet
%if 0%{?fedora} > 21
Recommends: python-theano
%endif
%description
SymPy aims to become a full-featured computer algebra system (CAS)
@ -43,6 +59,7 @@ while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries.
%if 0%{?with_python3}
%package -n python3-%{name}
Summary: A Python3 library for symbolic mathematics
Requires: python3-fastcache
@ -51,13 +68,16 @@ Requires: python3-matplotlib
Requires: python3-mpmath
Requires: python3-pyglet
%if 0%{?fedora} > 21
Recommends: python3-theano
%endif
%description -n python3-%{name}
SymPy aims to become a full-featured computer algebra system (CAS)
while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries.
%endif
%package texmacs
Summary: TeXmacs integration for sympy
@ -87,6 +107,7 @@ HTML documentation for sympy.
rm -rf sympy/mpmath doc/src/modules/mpmath
rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath
%if 0%{?with_python3}
# Make a copy for building the python3 version
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -97,25 +118,31 @@ cp -a . %{py3dir}
sed -e '/import warnings/ifrom sympy.utilities.pytest import XFAIL' \
-e '/^def test_matplotlib():/i@XFAIL' \
-i %{py3dir}/sympy/plotting/tests/test_plot_implicit.py
%endif
%build
# Build the python2 version
python2 setup.py build
%if 0%{?with_python3}
# Build the python3 version
pushd %{py3dir}
python3 setup.py build
popd
%endif
# Build the documentation
cd doc
make html
make cheatsheet
%if 0%{?with_python3}
pushd %{py3dir}/doc
make cheatsheet
popd
%endif
%install
%if 0%{?with_python3}
# Install the python3 version
pushd %{py3dir}
python3 setup.py install -O1 --skip-build --root %{buildroot}
@ -125,6 +152,7 @@ mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy
mv %{buildroot}%{_mandir}/man1/isympy.1 \
%{buildroot}%{_mandir}/man1/python3-isympy.1
popd
%endif
# Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
@ -151,8 +179,10 @@ cp -a doc/_build/html %{buildroot}%{_docdir}/%{name}-doc
rm -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo
rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
%if 0%{?with_python3}
# Stash the python3 build of the cheatsheet where %%doc can find it
cp -p %{py3dir}/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf .
%endif
%check
# The python3 tests fail with Unicode errors without this
@ -160,9 +190,11 @@ export LC_ALL=en_US.UTF-8
let "dnum = $RANDOM % 90 + 10"
xvfb-run -n $dnum python2 setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
xvfb-run -n $dnum python3 setup.py test
popd
%endif
%files
%doc AUTHORS README.rst doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
@ -172,6 +204,7 @@ popd
%{_bindir}/isympy
%{_mandir}/man1/isympy.1*
%if 0%{?with_python3}
%files -n python3-%{name}
%doc AUTHORS README.rst combinatoric_cheatsheet.pdf
%license LICENSE
@ -179,6 +212,7 @@ popd
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/python3-isympy
%{_mandir}/man1/python3-isympy.1*
%endif
%files texmacs
%license data/TeXmacs/LICENSE
@ -193,6 +227,12 @@ popd
%{_docdir}/%{name}-doc/html
%changelog
* Wed Jun 24 2015 Orion Poplawski <orion@cora.nwra.com> - 0.7.6-2
- No python3 in EPEL
* Fri May 22 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.7.6-2
- Conditionalize recommends.
* Fri Dec 5 2014 Jerry James <loganjerry@gmail.com> - 0.7.6-1
- Update to 0.7.6
- Drop upstreamed -test and -is-tangent patches