]>
Commit | Line | Data |
---|---|---|
a2265f01 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x modules | |
4 | %bcond_without python3 # CPython 3.x modules | |
5 | ||
6 | Summary: Python 2 numerical facilities - deprecated packages | |
7 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 2 - przestarzałe pakiety | |
8 | Name: python-numpy-compat | |
9 | Version: 1.8.2 | |
ef7c2ae6 | 10 | Release: 8 |
a2265f01 JB |
11 | Epoch: 1 |
12 | License: BSD | |
13 | Group: Libraries/Python | |
14 | Source0: http://downloads.sourceforge.net/numpy/numpy-%{version}.tar.gz | |
15 | # Source0-md5: dd8eece8f6fda3a13836de4adbafb0cb | |
16 | Patch0: python-numpy-fortran-version.patch | |
17 | URL: http://sourceforge.net/projects/numpy/ | |
6d855b39 | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
a2265f01 JB |
19 | %if %{with python2} |
20 | BuildRequires: python-devel | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-devel >= 1:3.3 | |
24 | BuildRequires: python3-2to3 | |
25 | %endif | |
26 | BuildRequires: gcc-fortran | |
27 | BuildRequires: lapack-devel >= 3.1.1-2 | |
28 | BuildRequires: rpm-pythonprov | |
29 | # -- dropped some time ago | |
30 | Obsoletes: python-numpy-Properties | |
31 | # -- dropped some time ago, should have been released as separate package, but wasn't | |
32 | Obsoletes: python-numpy-kinds | |
33 | # old subpackage, merged into main | |
34 | Obsoletes: python-numpy-FFT | |
35 | # -- dropped during Numeric->numpy transition (ma in main now?) | |
36 | Obsoletes: python-numpy-MA | |
37 | Obsoletes: python-numpy-RNG | |
38 | Obsoletes: python-Numeric | |
39 | Obsoletes: python-Numeric-FFT | |
40 | Obsoletes: python-Numeric-MA | |
41 | Obsoletes: python-Numeric-RNG | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | NumPy is a collection of extension modules to provide high-performance | |
46 | multidimensional numeric arrays to the Python programming language. | |
47 | ||
48 | This package contains deprecated modules (numarray and oldnumeric). | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia | |
52 | numeryczne na macierzach wielowymiarowych w języku Python. | |
53 | ||
54 | Ten pakiet zawiera przestarzałe moduły: numarray i oldnumeric. | |
55 | ||
56 | %package -n python-numpy-numarray | |
57 | Summary: Array manipulation and computations for Python 2 | |
58 | Summary(pl.UTF-8): Operacje i obliczenia na tablicach dla Pythona 2 | |
59 | Group: Development/Languages/Python | |
60 | Requires: python-numpy >= %{epoch}:%{version} | |
61 | ||
62 | %description -n python-numpy-numarray | |
63 | Numarray provides array manipulation and computational capabilities | |
64 | similar to those found in IDL, Matlab, or Octave. Using numarray, it | |
65 | is possible to write many efficient numerical data processing | |
66 | applications directly in Python without using any C, C++ or Fortran | |
67 | code (as well as doing such analysis interactively within Python or | |
68 | PyRAF). For algorithms that are not well suited for efficient | |
69 | computation using array facilities it is possible to write C functions | |
70 | (and eventually Fortran) that can read and write numarray arrays that | |
71 | can be called from Python. | |
72 | ||
73 | Numarray is a re-implementation of an older Python array module called | |
74 | Numeric. In general its interface is very similar. It is mostly | |
75 | backward compatible and will be becoming more so in future releases. | |
76 | ||
77 | This package contains Python 2 module. | |
78 | ||
79 | %description -n python-numpy-numarray -l pl.UTF-8 | |
80 | Numarray zapewnia narzędzia do operacji oraz obliczeń na tablicach | |
81 | podobne do tych, jakie zapewniają IDL, Matlab czy Octave. Używając | |
82 | numarray możliwe jest stworzenie bezpośrednio w Pythonie, nie używając | |
83 | wstawek C, C++ czy fortranowych, wielu wydajnych aplikacji do | |
84 | przetwarzania danych numerycznych. Dla algorytmów, które nie pracują | |
85 | wydajnie z tablicami, możliwe jest napisanie funkcji C, które mogą | |
86 | czytać i zapisywać tablice numarray, i które mogą być wywoływane z | |
87 | poziomu Pythona. | |
88 | ||
89 | Numarray jest ponowną implementacją starszego modułu Pythona - | |
90 | Numeric. Interfejsy tych modułów są do siebie bardzo podobne. Numarray | |
91 | jest w większości przypadków kompatybilny wstecz, a sytuacja poprawi | |
92 | się w nowszych wersjach. | |
93 | ||
94 | Ten pakiet zawiera moduł Pythona 2. | |
95 | ||
96 | %package -n python-numpy-numarray-devel | |
97 | Summary: Header files for python-numarray | |
98 | Summary(pl.UTF-8): Pliki nagłówkowe dla pakietu python-numarray | |
99 | Group: Development/Libraries | |
100 | Requires: python-numpy-devel >= %{epoch}:%{version} | |
101 | Requires: python-numpy-numarray = %{epoch}:%{version}-%{release} | |
102 | ||
103 | %description -n python-numpy-numarray-devel | |
104 | Header files for python-numarray. | |
105 | ||
106 | %description -n python-numpy-numarray-devel -l pl.UTF-8 | |
107 | Pliki nagłówkowe dla pakietu python-numarray. | |
108 | ||
109 | %package -n python-numpy-oldnumeric | |
110 | Summary: Python 2 modules providing backward compatibility with old Numeric packages | |
111 | Summary(pl.UTF-8): Moduły Pythona 2 zapewniające wsteczną kompatybilność ze starymi pakietami Numeric | |
112 | Group: Libraries/Python | |
113 | Requires: python-numpy >= %{epoch}:%{version} | |
114 | ||
115 | %description -n python-numpy-oldnumeric | |
116 | Python 2 modules providing backward compatibility with old Numeric | |
117 | packages. | |
118 | ||
119 | %description -n python-numpy-oldnumeric -l pl.UTF-8 | |
120 | Moduły Pythona 2 zapewniające wsteczną kompatybilność ze starymi | |
121 | pakietami Numeric. | |
122 | ||
123 | %package -n python3-numpy-numarray | |
124 | Summary: Array manipulation and computations for Python 3.x | |
125 | Summary(pl.UTF-8): Operacje i obliczenia na tablicach dla Pythona 3.x | |
126 | Group: Development/Languages/Python | |
127 | Requires: python3-numpy >= %{epoch}:%{version} | |
128 | ||
129 | %description -n python3-numpy-numarray | |
130 | Numarray provides array manipulation and computational capabilities | |
131 | similar to those found in IDL, Matlab, or Octave. Using numarray, it | |
132 | is possible to write many efficient numerical data processing | |
133 | applications directly in Python without using any C, C++ or Fortran | |
134 | code (as well as doing such analysis interactively within Python or | |
135 | PyRAF). For algorithms that are not well suited for efficient | |
136 | computation using array facilities it is possible to write C functions | |
137 | (and eventually Fortran) that can read and write numarray arrays that | |
138 | can be called from Python. | |
139 | ||
140 | Numarray is a re-implementation of an older Python array module called | |
141 | Numeric. In general its interface is very similar. It is mostly | |
142 | backward compatible and will be becoming more so in future releases. | |
143 | ||
144 | This package contains Python 3 module. | |
145 | ||
146 | %description -n python3-numpy-numarray -l pl.UTF-8 | |
147 | Numarray zapewnia narzędzia do operacji oraz obliczeń na tablicach | |
148 | podobne do tych, jakie zapewniają IDL, Matlab czy Octave. Używając | |
149 | numarray możliwe jest stworzenie bezpośrednio w Pythonie, nie używając | |
150 | wstawek C, C++ czy fortranowych, wielu wydajnych aplikacji do | |
151 | przetwarzania danych numerycznych. Dla algorytmów, które nie pracują | |
152 | wydajnie z tablicami, możliwe jest napisanie funkcji C, które mogą | |
153 | czytać i zapisywać tablice numarray, i które mogą być wywoływane z | |
154 | poziomu Pythona. | |
155 | ||
156 | Numarray jest ponowną implementacją starszego modułu Pythona - | |
157 | Numeric. Interfejsy tych modułów są do siebie bardzo podobne. Numarray | |
158 | jest w większości przypadków kompatybilny wstecz, a sytuacja poprawi | |
159 | się w nowszych wersjach. | |
160 | ||
161 | Ten pakiet zawiera moduł Pythona 3. | |
162 | ||
163 | %package -n python3-numpy-numarray-devel | |
164 | Summary: Header files for python3-numarray | |
165 | Summary(pl.UTF-8): Pliki nagłówkowe dla pakietu python3-numarray | |
166 | Group: Development/Libraries | |
167 | Requires: python3-numpy-devel >= %{epoch}:%{version} | |
168 | Requires: python3-numpy-numarray = %{epoch}:%{version}-%{release} | |
169 | ||
170 | %description -n python3-numpy-numarray-devel | |
171 | Header files for python3-numarray. | |
172 | ||
173 | %description -n python3-numpy-numarray-devel -l pl.UTF-8 | |
174 | Pliki nagłówkowe dla pakietu python3-numarray. | |
175 | ||
176 | %package -n python3-numpy-oldnumeric | |
177 | Summary: Python 3 modules providing backward compatibility with old Numeric packages | |
178 | Summary(pl.UTF-8): Moduły Pythona 3 zapewniające wsteczną kompatybilność ze starymi pakietami Numeric | |
179 | Group: Libraries/Python | |
180 | Requires: python3-numpy >= %{epoch}:%{version} | |
181 | ||
182 | %description -n python3-numpy-oldnumeric | |
183 | Python 3 modules providing backward compatibility with old Numeric | |
184 | packages. | |
185 | ||
186 | %description -n python3-numpy-oldnumeric -l pl.UTF-8 | |
187 | Moduły Pythona 3 zapewniające wsteczną kompatybilność ze starymi | |
188 | pakietami Numeric. | |
189 | ||
190 | %prep | |
191 | %setup -q -n numpy-%{version} | |
192 | %patch0 -p1 | |
193 | ||
194 | %build | |
b16ea93e JB |
195 | # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements, |
196 | # instead of appending proper options (like -fPIC/-shared resp.) | |
197 | CFLAGS="%{rpmcflags} -fPIC" | |
198 | LDFLAGS="%{rpmldflags} -shared" | |
a2265f01 JB |
199 | |
200 | %if %{with python2} | |
b16ea93e | 201 | %py_build |
a2265f01 JB |
202 | %endif |
203 | ||
204 | %if %{with python3} | |
b16ea93e | 205 | %py3_build |
a2265f01 JB |
206 | %endif |
207 | ||
208 | %install | |
209 | rm -rf $RPM_BUILD_ROOT | |
210 | ||
211 | %if %{with python2} | |
0fb11673 | 212 | %py_install |
a2265f01 JB |
213 | |
214 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
215 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
216 | ||
217 | # leave only numarray and oldnumeric | |
6518daa8 | 218 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/f2py2 |
a2265f01 JB |
219 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/numpy/{compat,core,doc,distutils,f2py,fft,lib,linalg,ma,matrixlib,polynomial,random,testing,tests} |
220 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/numpy/*.py* | |
221 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/numpy-%{version}-py*.egg-info | |
222 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/numpy/*/tests | |
223 | %endif | |
224 | ||
225 | %if %{with python3} | |
0fb11673 | 226 | %py3_install |
a2265f01 JB |
227 | |
228 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
229 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
230 | ||
231 | # leave only numarray and oldnumeric | |
232 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/f2py3 | |
233 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/numpy/{__pycache__,compat,core,doc,distutils,f2py,fft,lib,linalg,ma,matrixlib,polynomial,random,testing,tests} | |
234 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/numpy/*.py | |
235 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/numpy-%{version}-py*.egg-info | |
236 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/numpy/*/tests | |
237 | %endif | |
238 | ||
239 | %clean | |
240 | rm -rf $RPM_BUILD_ROOT | |
241 | ||
242 | %if %{with python2} | |
243 | %files -n python-numpy-numarray | |
244 | %defattr(644,root,root,755) | |
245 | %dir %{py_sitedir}/numpy/numarray | |
246 | %{py_sitedir}/numpy/numarray/*.py | |
247 | %{py_sitedir}/numpy/numarray/*.py[co] | |
248 | %attr(755,root,root) %{py_sitedir}/numpy/numarray/_capi.so | |
249 | ||
250 | %files -n python-numpy-numarray-devel | |
251 | %defattr(644,root,root,755) | |
252 | %{py_sitedir}/numpy/numarray/include | |
253 | ||
254 | %files -n python-numpy-oldnumeric | |
255 | %defattr(644,root,root,755) | |
256 | %dir %{py_sitedir}/numpy/oldnumeric | |
257 | %{py_sitedir}/numpy/oldnumeric/*.py | |
258 | %{py_sitedir}/numpy/oldnumeric/*.py[co] | |
259 | %endif | |
260 | ||
261 | %if %{with python3} | |
262 | %files -n python3-numpy-numarray | |
263 | %defattr(644,root,root,755) | |
264 | %dir %{py3_sitedir}/numpy/numarray | |
265 | %{py3_sitedir}/numpy/numarray/*.py | |
266 | %{py3_sitedir}/numpy/numarray/__pycache__ | |
267 | %attr(755,root,root) %{py3_sitedir}/numpy/numarray/_capi.cpython-3*.so | |
268 | ||
269 | %files -n python3-numpy-numarray-devel | |
270 | %defattr(644,root,root,755) | |
271 | %{py3_sitedir}/numpy/numarray/include | |
272 | ||
273 | %files -n python3-numpy-oldnumeric | |
274 | %defattr(644,root,root,755) | |
275 | %dir %{py3_sitedir}/numpy/oldnumeric | |
276 | %{py3_sitedir}/numpy/oldnumeric/*.py | |
277 | %{py3_sitedir}/numpy/oldnumeric/__pycache__ | |
278 | %endif |