No python3 in EPEL

This commit is contained in:
Orion Poplawski 2015-06-24 15:53:48 -06:00
parent 4d3fd930d0
commit 129838e3ae
1 changed files with 41 additions and 8 deletions

View File

@ -1,3 +1,7 @@
%if 0%{?fedora}
%global with_python3 1
%endif
Name: sympy
Version: 0.7.6
Release: 2%{?dist}
@ -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
@ -45,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
@ -62,6 +77,7 @@ 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
@ -91,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}
@ -101,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}
@ -129,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}
@ -155,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
@ -164,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
@ -176,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
@ -183,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
@ -197,6 +227,9 @@ 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.