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
17 # Source0-md5: ef8a6449851755319673b06f71731d52
19 #Source0Download: https://github.com/fredrik-johansson/mpmath/releases
20 #Source0: https://github.com/fredrik-johansson/mpmath/archive/%{version}/mpmath-%{version}.tar.gz
21 ## Source0-md5: c06bdf456bbbf092c929931974c8dac9
22 URL: http://mpmath.org/
24 BuildRequires: python-devel >= 1:2.7
25 BuildRequires: python-setuptools >= 1:36.7.0
26 BuildRequires: python-setuptools_scm >= 1.7.0
28 BuildRequires: python-pytest >= 4.6
32 BuildRequires: python3-devel >= 1:3.4
33 BuildRequires: python3-setuptools >= 1:36.7.0
34 BuildRequires: python3-setuptools_scm >= 1.7.0
36 BuildRequires: python3-pytest >= 4.6
39 BuildRequires: rpmbuild(macros) >= 1.714
40 %{?with_doc:BuildRequires: sphinx-pdg}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Mpmath is a pure-Python library for multiprecision floating-point
46 arithmetic. It provides an extensive set of transcendental functions,
47 unlimited exponent sizes, complex numbers, interval arithmetic,
48 numerical integration and differentiation, root-finding, linear
49 algebra, and much more. Almost any calculation can be performed just
50 as well at 10-digit or 1000-digit precision, and in many cases mpmath
51 implements asymptotically fast algorithms that scale well for
52 extremely high precision work. If available, mpmath will (optionally)
53 use gmpy to speed up high precision operations.
55 If you require plotting capabilities in mpmath, install
58 %description -l pl.UTF-8
59 Mpmath to czysto pythonowa biblioteka do arytmetyki
60 zmiennoprzecinkowej wielokrotnej precyzji. Zapewnia obszerny zbiór
61 funkcji przestępnych, nieograniczone rozmiary wykładnika, liczby
62 zespolone, arytmetykę na przedziałach, całkowanie i różniczkowanie
63 numeryczne, szukanie pierwiastków, algebrę liniową itd. Można
64 wykonać prawie dowolne obliczenia, zarówno z 10-cyfrową, jak i
65 1000-cyfrową dokładnością, a dla wielu przypadków mpmath ma
66 zaimplementowane asymptotycznie szybkie algorytmy, dobrze skalujące
67 się dla bardzo dużej precyzji. Mpmath może opcjonalnie (jeśli jest
68 dostępny) używać modułu gmpy do przyspieszenia operacji.
70 Do obsługi wykresów w mpmath należy zainstalować pakiet
73 %package -n python3-mpmath
74 Summary: A pure Python library for multiprecision floating-point arithmetic
75 Summary(pl.UTF-8): Czysto pythonowa biblioteka do arytmetyki zmiennoprzecinkowej wielokrotnej precyzji
76 Group: Libraries/Python
78 %description -n python3-mpmath
79 Mpmath is a pure-Python library for multiprecision floating-point
80 arithmetic. It provides an extensive set of transcendental functions,
81 unlimited exponent sizes, complex numbers, interval arithmetic,
82 numerical integration and differentiation, root-finding, linear
83 algebra, and much more. Almost any calculation can be performed just
84 as well at 10-digit or 1000-digit precision, and in many cases mpmath
85 implements asymptotically fast algorithms that scale well for
86 extremely high precision work. If available, mpmath will (optionally)
87 use gmpy to speed up high precision operations.
89 If you require plotting capabilities in mpmath, install
92 %description -n python3-mpmath -l pl.UTF-8
93 Mpmath to czysto pythonowa biblioteka do arytmetyki
94 zmiennoprzecinkowej wielokrotnej precyzji. Zapewnia obszerny zbiór
95 funkcji przestępnych, nieograniczone rozmiary wykładnika, liczby
96 zespolone, arytmetykę na przedziałach, całkowanie i różniczkowanie
97 numeryczne, szukanie pierwiastków, algebrę liniową itd. Można
98 wykonać prawie dowolne obliczenia, zarówno z 10-cyfrową, jak i
99 1000-cyfrową dokładnością, a dla wielu przypadków mpmath ma
100 zaimplementowane asymptotycznie szybkie algorytmy, dobrze skalujące
101 się dla bardzo dużej precyzji. Mpmath może opcjonalnie (jeśli jest
102 dostępny) używać modułu gmpy do przyspieszenia operacji.
104 Do obsługi wykresów w mpmath należy zainstalować pakiet
108 Summary: API documentation for mpmath module
109 Summary(pl.UTF-8): Dokumentacja API modułu mpmath
111 Requires: %{name} = %{version}-%{release}
114 This package contains the HTML documentation for mpmath module.
116 %description doc -l pl.UTF-8
117 Ten pakiet zawiera dokumentację modułu mpmath w formacie HTML.
120 %setup -q -n mpmath-%{version}
122 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"
123 # Get rid of unnecessary shebangs
124 for lib in $shebangs; do
125 %{__sed} '/^#!.*/d; 1q' $lib > $lib.new && \
126 touch -r $lib $lib.new && \
127 %{__mv} $lib.new $lib
135 # test_axes uses DISPLAY
136 #%{__python} -m pytest -k 'not test_axes' mpmath/tests
137 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
138 %{__python} -m pytest -k 'not test_axes' mpmath/tests
146 #%{__python3} -m pytest -k 'not test_axes' mpmath/tests
147 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
148 %{__python3} -m pytest -k 'not test_axes' mpmath/tests
155 sphinx-build -E source build
159 rm -rf $RPM_BUILD_ROOT
165 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/mpmath/tests
171 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/mpmath/tests
175 rm -rf $RPM_BUILD_ROOT
179 %defattr(644,root,root,755)
180 %doc CHANGES LICENSE README.rst TODO
181 %{py_sitescriptdir}/mpmath
182 %{py_sitescriptdir}/mpmath-%{version}-*.egg-info
186 %files -n python3-mpmath
187 %defattr(644,root,root,755)
188 %doc CHANGES LICENSE README.rst TODO
189 %{py3_sitescriptdir}/mpmath
190 %{py3_sitescriptdir}/mpmath-%{version}-*.egg-info
195 %defattr(644,root,root,755)
196 %doc doc/build/{_images,_static,calculus,functions,*.html,*.js}