3 %bcond_without doc # HTML documentation
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_without tests # unit tests
8 Summary: A pure Python library for multiprecision floating-point arithmetic
9 Summary(pl.UTF-8): Czysto pythonowa biblioteka do arytmetyki zmiennoprzecinkowej wielokrotnej precyzji
14 Group: Libraries/Python
15 # pypi release is missing docs
16 #Source0: https://files.pythonhosted.org/packages/source/m/mpmath/mpmath-%{version}.tar.gz
18 #Source0Download: https://github.com/fredrik-johansson/mpmath/releases
19 Source0: https://github.com/fredrik-johansson/mpmath/archive/%{version}/mpmath-%{version}.tar.gz
20 # Source0-md5: c06bdf456bbbf092c929931974c8dac9
21 URL: http://mpmath.org/
23 BuildRequires: python-devel >= 1:2.7
25 #BuildRequires: python-setuptools >= 36.7.0
26 #BuildRequires: python-setuptools_scm >= 1.7.0
28 BuildRequires: python-pytest
32 BuildRequires: python3-devel >= 1:3.4
34 #BuildRequires: python3-setuptools >= 36.7.0
35 #BuildRequires: python3-setuptools_scm >= 1.7.0
37 BuildRequires: python3-pytest
40 BuildRequires: rpmbuild(macros) >= 1.714
41 %{?with_doc:BuildRequires: sphinx-pdg}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Mpmath is a pure-Python library for multiprecision floating-point
47 arithmetic. It provides an extensive set of transcendental functions,
48 unlimited exponent sizes, complex numbers, interval arithmetic,
49 numerical integration and differentiation, root-finding, linear
50 algebra, and much more. Almost any calculation can be performed just
51 as well at 10-digit or 1000-digit precision, and in many cases mpmath
52 implements asymptotically fast algorithms that scale well for
53 extremely high precision work. If available, mpmath will (optionally)
54 use gmpy to speed up high precision operations.
56 If you require plotting capabilities in mpmath, install
59 %description -l pl.UTF-8
60 Mpmath to czysto pythonowa biblioteka do arytmetyki
61 zmiennoprzecinkowej wielokrotnej precyzji. Zapewnia obszerny zbiór
62 funkcji przestępnych, nieograniczone rozmiary wykładnika, liczby
63 zespolone, arytmetykę na przedziałach, całkowanie i różniczkowanie
64 numeryczne, szukanie pierwiastków, algebrę liniową itd. Można
65 wykonać prawie dowolne obliczenia, zarówno z 10-cyfrową, jak i
66 1000-cyfrową dokładnością, a dla wielu przypadków mpmath ma
67 zaimplementowane asymptotycznie szybkie algorytmy, dobrze skalujące
68 się dla bardzo dużej precyzji. Mpmath może opcjonalnie (jeśli jest
69 dostępny) używać modułu gmpy do przyspieszenia operacji.
71 Do obsługi wykresów w mpmath należy zainstalować pakiet
74 %package -n python3-mpmath
75 Summary: A pure Python library for multiprecision floating-point arithmetic
76 Summary(pl.UTF-8): Czysto pythonowa biblioteka do arytmetyki zmiennoprzecinkowej wielokrotnej precyzji
77 Group: Libraries/Python
79 %description -n python3-mpmath
80 Mpmath is a pure-Python library for multiprecision floating-point
81 arithmetic. It provides an extensive set of transcendental functions,
82 unlimited exponent sizes, complex numbers, interval arithmetic,
83 numerical integration and differentiation, root-finding, linear
84 algebra, and much more. Almost any calculation can be performed just
85 as well at 10-digit or 1000-digit precision, and in many cases mpmath
86 implements asymptotically fast algorithms that scale well for
87 extremely high precision work. If available, mpmath will (optionally)
88 use gmpy to speed up high precision operations.
90 If you require plotting capabilities in mpmath, install
93 %description -n python3-mpmath -l pl.UTF-8
94 Mpmath to czysto pythonowa biblioteka do arytmetyki
95 zmiennoprzecinkowej wielokrotnej precyzji. Zapewnia obszerny zbiór
96 funkcji przestępnych, nieograniczone rozmiary wykładnika, liczby
97 zespolone, arytmetykę na przedziałach, całkowanie i różniczkowanie
98 numeryczne, szukanie pierwiastków, algebrę liniową itd. Można
99 wykonać prawie dowolne obliczenia, zarówno z 10-cyfrową, jak i
100 1000-cyfrową dokładnością, a dla wielu przypadków mpmath ma
101 zaimplementowane asymptotycznie szybkie algorytmy, dobrze skalujące
102 się dla bardzo dużej precyzji. Mpmath może opcjonalnie (jeśli jest
103 dostępny) używać modułu gmpy do przyspieszenia operacji.
105 Do obsługi wykresów w mpmath należy zainstalować pakiet
109 Summary: API documentation for mpmath module
110 Summary(pl.UTF-8): Dokumentacja API modułu mpmath
112 Requires: %{name} = %{version}-%{release}
115 This package contains the HTML documentation for mpmath module.
117 %description doc -l pl.UTF-8
118 Ten pakiet zawiera dokumentację modułu mpmath w formacie HTML.
121 %setup -q -n mpmath-%{version}
123 shebangs="mpmath/matrices/eigen.py mpmath/matrices/eigen_symmetric.py mpmath/tests/test_eigen.py mpmath/tests/test_eigen_symmetric.py mpmath/tests/test_levin.py"
124 # Get rid of unnecessary shebangs
125 for lib in $shebangs; do
126 %{__sed} '/^#!.*/d; 1q' $lib > $lib.new && \
127 touch -r $lib $lib.new && \
128 %{__mv} $lib.new $lib
136 %{__python} -m pytest -k 'not test_axes' mpmath/tests
144 %{__python3} -m pytest -k 'not test_axes' mpmath/tests
151 sphinx-build -E source build
155 rm -rf $RPM_BUILD_ROOT
161 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/mpmath/tests
167 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/mpmath/tests
171 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
176 %doc CHANGES LICENSE README.rst TODO
177 %{py_sitescriptdir}/mpmath
178 %{py_sitescriptdir}/mpmath-%{version}-*.egg-info
182 %files -n python3-mpmath
183 %defattr(644,root,root,755)
185 %{py3_sitescriptdir}/mpmath
186 %{py3_sitescriptdir}/mpmath-%{version}-*.egg-info
191 %defattr(644,root,root,755)
192 %doc doc/build/{_images,_static,calculus,functions,*.html,*.js}