From e91a6db242cfb6df476c2fbee529734b333c1f72 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jul 20 2018 20:06:17 +0000 Subject: User versioned python and spec file modernization - drop obsolete Group tags - use python macros - add missing %python_provide call for the python3 subpackage - use Recommends instead of a line in %description for matplotlib The build still fails because of PEP-479 incompatibility. --- diff --git a/python-mpmath.spec b/python-mpmath.spec index 502a00e..9f94b31 100644 --- a/python-mpmath.spec +++ b/python-mpmath.spec @@ -8,7 +8,6 @@ Name: python-mpmath Version: 1.0.0 Release: 3%{?dist} Summary: A pure Python library for multiprecision floating-point arithmetic -Group: Applications/Engineering License: BSD URL: http://mpmath.org # Source code @@ -37,15 +36,13 @@ differentiation, root-finding, linear algebra, and much more. Almost any\ calculation can be performed just as well at 10-digit or 1000-digit precision,\ and in many cases mpmath implements asymptotically fast algorithms that scale\ well for extremely high precision work. If available, mpmath will (optionally)\ -use gmpy to speed up high precision operations.\ -\ -If you require plotting capabilities in mpmath, install python-matplotlib.\ - +use gmpy to speed up high precision operations. %description %_description %package -n python2-mpmath Summary: %summary +Recommends: python2-matplotlib %{?python_provide:%python_provide python2-mpmath} %description -n python2-mpmath %_description @@ -53,6 +50,8 @@ Summary: %summary %if 0%{?with_python3} %package -n python3-mpmath Summary: A pure Python library for multiprecision floating-point arithmetic +Recommends: python3-matplotlib +%{?python_provide:%python_provide python3-mpmath} %description -n python3-mpmath Mpmath is a pure-Python library for multiprecision floating-point arithmetic. @@ -70,7 +69,6 @@ If you require plotting capabilities in mpmath, install python3-matplotlib. %package doc Summary: HTML documentation for %{name} -Group: Documentation Requires: python2-mpmath = %{version}-%{release} %description doc @@ -100,24 +98,24 @@ for lib in $shebangs; do done %build -python setup.py build +%py2_build # Build documentation cd doc -python build.py +%{__python2} build.py %install -python setup.py install --skip-build --root %{buildroot} +%py2_install # Get rid of python 3 version that fails to byte-compile %if 0%{?with_python3} -python3 setup.py install --skip-build --root %{buildroot} +%py3_install %endif # with _python3 %check export PYTHONPATH=`pwd`/build/lib cd build/lib/mpmath/tests/ -python runtests.py +%{__python2} runtests.py %if 0%{?with_python3} -python3 runtests.py +%{__python3} runtests.py %endif # with _python3 %files -n python2-mpmath