No python3 in EPEL

This commit is contained in:
Orion Poplawski 2015-06-24 15:53:48 -06:00
parent 4d3fd930d0
commit 129838e3ae

View File

@ -1,3 +1,7 @@
%if 0%{?fedora}
%global with_python3 1
%endif
Name: sympy Name: sympy
Version: 0.7.6 Version: 0.7.6
Release: 2%{?dist} Release: 2%{?dist}
@ -15,15 +19,25 @@ BuildRequires: gettext
BuildRequires: graphviz BuildRequires: graphviz
BuildRequires: ImageMagick BuildRequires: ImageMagick
BuildRequires: librsvg2-tools BuildRequires: librsvg2-tools
BuildRequires: numpy python3-numpy BuildRequires: numpy
BuildRequires: numpy-f2py python3-numpy-f2py BuildRequires: numpy-f2py
BuildRequires: python2-devel python3-devel BuildRequires: python2-devel
BuildRequires: python-fastcache python3-fastcache BuildRequires: python-fastcache
BuildRequires: python-gmpy2 python3-gmpy2 BuildRequires: python-gmpy2
BuildRequires: python-matplotlib python3-matplotlib BuildRequires: python-matplotlib
BuildRequires: python-mpmath python3-mpmath BuildRequires: python-mpmath
BuildRequires: python-sphinx 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(latex)
BuildRequires: tex-dvipng BuildRequires: tex-dvipng
BuildRequires: xorg-x11-fonts-Type1 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 comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries. Python and does not require any external libraries.
%if 0%{?with_python3}
%package -n python3-%{name} %package -n python3-%{name}
Summary: A Python3 library for symbolic mathematics Summary: A Python3 library for symbolic mathematics
Requires: python3-fastcache 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 while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries. Python and does not require any external libraries.
%endif
%package texmacs %package texmacs
Summary: TeXmacs integration for sympy Summary: TeXmacs integration for sympy
@ -91,6 +107,7 @@ HTML documentation for sympy.
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
%if 0%{?with_python3}
# Make a copy for building the python3 version # Make a copy for building the python3 version
rm -rf %{py3dir} rm -rf %{py3dir}
cp -a . %{py3dir} cp -a . %{py3dir}
@ -101,25 +118,31 @@ cp -a . %{py3dir}
sed -e '/import warnings/ifrom sympy.utilities.pytest import XFAIL' \ sed -e '/import warnings/ifrom sympy.utilities.pytest import XFAIL' \
-e '/^def test_matplotlib():/i@XFAIL' \ -e '/^def test_matplotlib():/i@XFAIL' \
-i %{py3dir}/sympy/plotting/tests/test_plot_implicit.py -i %{py3dir}/sympy/plotting/tests/test_plot_implicit.py
%endif
%build %build
# Build the python2 version # Build the python2 version
python2 setup.py build python2 setup.py build
%if 0%{?with_python3}
# Build the python3 version # Build the python3 version
pushd %{py3dir} pushd %{py3dir}
python3 setup.py build python3 setup.py build
popd popd
%endif
# Build the documentation # Build the documentation
cd doc cd doc
make html make html
make cheatsheet make cheatsheet
%if 0%{?with_python3}
pushd %{py3dir}/doc pushd %{py3dir}/doc
make cheatsheet make cheatsheet
popd popd
%endif
%install %install
%if 0%{?with_python3}
# 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}
@ -129,6 +152,7 @@ mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/python3-isympy
mv %{buildroot}%{_mandir}/man1/isympy.1 \ mv %{buildroot}%{_mandir}/man1/isympy.1 \
%{buildroot}%{_mandir}/man1/python3-isympy.1 %{buildroot}%{_mandir}/man1/python3-isympy.1
popd popd
%endif
# Install the python2 version # Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot} 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 -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo
rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
%if 0%{?with_python3}
# Stash the python3 build of the cheatsheet where %%doc can find it # Stash the python3 build of the cheatsheet where %%doc can find it
cp -p %{py3dir}/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf . cp -p %{py3dir}/doc/_build/cheatsheet/combinatoric_cheatsheet.pdf .
%endif
%check %check
# The python3 tests fail with Unicode errors without this # 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" let "dnum = $RANDOM % 90 + 10"
xvfb-run -n $dnum python2 setup.py test xvfb-run -n $dnum python2 setup.py test
%if 0%{?with_python3}
pushd %{py3dir} pushd %{py3dir}
xvfb-run -n $dnum python3 setup.py test xvfb-run -n $dnum python3 setup.py test
popd popd
%endif
%files %files
%doc AUTHORS README.rst doc/_build/cheatsheet/combinatoric_cheatsheet.pdf %doc AUTHORS README.rst doc/_build/cheatsheet/combinatoric_cheatsheet.pdf
@ -176,6 +204,7 @@ popd
%{_bindir}/isympy %{_bindir}/isympy
%{_mandir}/man1/isympy.1* %{_mandir}/man1/isympy.1*
%if 0%{?with_python3}
%files -n python3-%{name} %files -n python3-%{name}
%doc AUTHORS README.rst combinatoric_cheatsheet.pdf %doc AUTHORS README.rst combinatoric_cheatsheet.pdf
%license LICENSE %license LICENSE
@ -183,6 +212,7 @@ popd
%{python3_sitelib}/sympy-%{version}-*.egg-info %{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/python3-isympy %{_bindir}/python3-isympy
%{_mandir}/man1/python3-isympy.1* %{_mandir}/man1/python3-isympy.1*
%endif
%files texmacs %files texmacs
%license data/TeXmacs/LICENSE %license data/TeXmacs/LICENSE
@ -197,6 +227,9 @@ popd
%{_docdir}/%{name}-doc/html %{_docdir}/%{name}-doc/html
%changelog %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 * Fri May 22 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.7.6-2
- Conditionalize recommends. - Conditionalize recommends.