diff --git a/python-mpmath.spec b/python-mpmath.spec index 1d05448..a392d09 100644 --- a/python-mpmath.spec +++ b/python-mpmath.spec @@ -1,12 +1,6 @@ -%if 0%{?fedora} > 17 -%global with_python3 1 -%else -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%endif - Name: python-mpmath Version: 1.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A pure Python library for multiprecision floating-point arithmetic License: BSD URL: http://mpmath.org @@ -18,19 +12,13 @@ Patch0: python-mpmath-1.0.0-sphinx.patch BuildArch: noarch -BuildRequires: python2-devel # For building documentation BuildRequires: dvipng BuildRequires: tex(latex) -BuildRequires: python2-pytest -%if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-sphinx -%else -BuildRequires: python2-sphinx -%endif BuildRequires: xorg-x11-server-Xvfb %global _description\ @@ -45,16 +33,6 @@ use gmpy to speed up high precision operations. %description %_description -%package -n python2-mpmath -Summary: %summary -%if 0%{?fedora} || 0%{?rhel} > 7 -Recommends: python2-matplotlib -%endif -%{?python_provide:%python_provide python2-mpmath} - -%description -n python2-mpmath %_description - -%if 0%{?with_python3} %package -n python3-mpmath Summary: A pure Python library for multiprecision floating-point arithmetic %if 0%{?fedora} || 0%{?rhel} > 7 @@ -65,16 +43,11 @@ Recommends: python3-matplotlib %description -n python3-mpmath %_description If you require plotting capabilities in mpmath, install python3-matplotlib. -%endif # with_python3 %package doc Summary: HTML documentation for %{name} -%if 0%{?with_python3} Requires: python3-mpmath = %{version}-%{release} -%else -Requires: python2-mpmath = %{version}-%{release} -%endif %description doc This package contains the HTML documentation for %{name}. @@ -103,45 +76,32 @@ for lib in $shebangs; do done %build -%py2_build +%py3_build + # Build documentation cd doc -%if 0%{?with_python3} %{__python3} build.py -%else -%{__python2} build.py -%endif %install -%py2_install -# Get rid of python 3 version that fails to byte-compile -%if 0%{?with_python3} %py3_install -%endif # with _python3 %check cd build/lib/mpmath/tests/ -xvfb-run -a py.test-2 -%if 0%{?with_python3} xvfb-run -a py.test-3 -%endif # with _python3 -%files -n python2-mpmath -%doc CHANGES LICENSE README.rst TODO -%{python2_sitelib}/mpmath/ -%{python2_sitelib}/mpmath-%{version}-*.egg-info - -%if 0%{?with_python3} %files -n python3-mpmath %doc CHANGES LICENSE README.rst TODO %{python3_sitelib}/mpmath/ %{python3_sitelib}/mpmath-%{version}-*.egg-info -%endif # with _python3 %files doc %doc doc/build/* %changelog +* Wed Mar 20 2019 Miro Hrončok - 1.1.0-3 +- Subpackage python2-mpmath has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Mon Mar 11 2019 Zbigniew Jędrzejewski-Szmek - 1.1.0-2 - Build docs using python3-sphinx