]> git.pld-linux.org Git - SPECS.git/blob - python-mpmath.spec
SPECS updated Sat 31 Jul 20:27:02 CEST 2021
[SPECS.git] / python-mpmath.spec
1 #
2 # Conditional build:
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
7
8 Summary:        A pure Python library for multiprecision floating-point arithmetic
9 Summary(pl.UTF-8):      Czysto pythonowa biblioteka do arytmetyki zmiennoprzecinkowej wielokrotnej precyzji
10 Name:           python-mpmath
11 Version:        1.1.0
12 Release:        4
13 License:        BSD
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 # ... so use github
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/
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.7
24 # for > 1.1.0
25 #BuildRequires: python-setuptools >= 36.7.0
26 #BuildRequires: python-setuptools_scm >= 1.7.0
27 %if %{with tests}
28 BuildRequires:  python-pytest
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel >= 1:3.4
33 # for > 1.1.0
34 #BuildRequires: python3-setuptools >= 36.7.0
35 #BuildRequires: python3-setuptools_scm >= 1.7.0
36 %if %{with tests}
37 BuildRequires:  python3-pytest
38 %endif
39 %endif
40 BuildRequires:  rpmbuild(macros) >= 1.714
41 %{?with_doc:BuildRequires:      sphinx-pdg}
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
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.
55
56 If you require plotting capabilities in mpmath, install
57 python-matplotlib.
58
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.
70
71 Do obsługi wykresów w mpmath należy zainstalować pakiet
72 python-matplotlib.
73
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
78
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.
89
90 If you require plotting capabilities in mpmath, install
91 python3-matplotlib.
92
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.
104
105 Do obsługi wykresów w mpmath należy zainstalować pakiet
106 python3-matplotlib.
107
108 %package doc
109 Summary:        API documentation for mpmath module
110 Summary(pl.UTF-8):      Dokumentacja API modułu mpmath
111 Group:          Documentation
112 Requires:       %{name} = %{version}-%{release}
113
114 %description doc
115 This package contains the HTML documentation for mpmath module.
116
117 %description doc -l pl.UTF-8
118 Ten pakiet zawiera dokumentację modułu mpmath w formacie HTML.
119
120 %prep
121 %setup -q -n mpmath-%{version}
122
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
129 done
130
131 %build
132 %if %{with python2}
133 %py_build
134
135 %if %{with tests}
136 %{__python} -m pytest -k 'not test_axes' mpmath/tests
137 %endif
138 %endif
139
140 %if %{with python3}
141 %py3_build
142
143 %if %{with tests}
144 %{__python3} -m pytest -k 'not test_axes' mpmath/tests
145 %endif
146 %endif
147
148 %if %{with doc}
149 cd doc
150 install -d build
151 sphinx-build -E source build
152 %endif
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156
157 %if %{with python2}
158 %py_install
159
160 %py_postclean
161 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/mpmath/tests
162 %endif
163
164 %if %{with python3}
165 %py3_install
166
167 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/mpmath/tests
168 %endif
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %if %{with python2}
174 %files
175 %defattr(644,root,root,755)
176 %doc CHANGES LICENSE README.rst TODO
177 %{py_sitescriptdir}/mpmath
178 %{py_sitescriptdir}/mpmath-%{version}-*.egg-info
179 %endif
180
181 %if %{with python3}
182 %files -n python3-mpmath
183 %defattr(644,root,root,755)
184 %doc CHANGES LICENSE
185 %{py3_sitescriptdir}/mpmath
186 %{py3_sitescriptdir}/mpmath-%{version}-*.egg-info
187 %endif
188
189 %if %{with doc}
190 %files doc
191 %defattr(644,root,root,755)
192 %doc doc/build/{_images,_static,calculus,functions,*.html,*.js}
193 %endif
This page took 0.057165 seconds and 3 git commands to generate.