]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | %define module numpy | |
6 | Summary: Python 3.x numerical facilities | |
7 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 3.x | |
8 | Name: python3-%{module} | |
9 | Version: 1.22.2 | |
10 | Release: 1 | |
11 | Epoch: 1 | |
12 | License: BSD | |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://github.com/numpy/numpy/releases/ | |
15 | Source0: https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz | |
16 | # Source0-md5: 5b506b01ef454f39272ca75de1c7f61c | |
17 | URL: https://github.com/numpy/numpy | |
18 | BuildRequires: gcc-fortran | |
19 | BuildRequires: lapack-devel >= 3.1.1-2 | |
20 | BuildRequires: python3-Cython >= 0.29.24 | |
21 | BuildRequires: python3-devel >= 1:3.6 | |
22 | BuildRequires: python3-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python3-pytest | |
25 | %endif | |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.714 | |
28 | Requires: python3-libs >= 1:3.6 | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | NumPy is a collection of extension modules to provide high-performance | |
33 | multidimensional numeric arrays to the Python programming language. | |
34 | ||
35 | This package contains Python 3 modules. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia | |
39 | numeryczne na macierzach wielowymiarowych w języku Python. | |
40 | ||
41 | Ten pakiet zawiera moduły Pythona 3. | |
42 | ||
43 | %package devel | |
44 | Summary: C header files for Python 3 numerical modules | |
45 | Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 3 | |
46 | Group: Development/Languages/Python | |
47 | %pyrequires_eq python3-devel | |
48 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
49 | ||
50 | %description devel | |
51 | C header files for Python 3 numerical modules. | |
52 | ||
53 | %description devel -l pl.UTF-8 | |
54 | Pliki nagłówkowe języka C modułów numerycznych Pythona 3. | |
55 | ||
56 | %package -n f2py3 | |
57 | Summary: Fortran to Python 3 interface generator | |
58 | Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3 | |
59 | Group: Libraries/Python | |
60 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
61 | ||
62 | %description -n f2py3 | |
63 | Fortran to Python 3 interface generator. | |
64 | ||
65 | %description -n f2py3 -l pl.UTF-8 | |
66 | Generator interfejsów z Fortranu do Pythona 3. | |
67 | ||
68 | %prep | |
69 | %setup -q -n %{module}-%{version} | |
70 | ||
71 | %build | |
72 | # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements, | |
73 | # instead of appending proper options (like -fPIC/-shared resp.) | |
74 | CFLAGS="%{rpmcflags} -fPIC" | |
75 | LDFLAGS="%{rpmldflags} -shared" | |
76 | ||
77 | %py3_build | |
78 | ||
79 | %if %{with tests} | |
80 | %{__python3} runtests.py --mode=full | |
81 | %endif | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
86 | %py3_install | |
87 | ||
88 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc | |
89 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/random/_examples | |
90 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/tests | |
91 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests | |
92 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/LICENSE.txt | |
93 | ||
94 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c | |
95 | ||
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc LICENSE.txt THANKS.txt | |
102 | %dir %{py3_sitedir}/%{module} | |
103 | %{py3_sitedir}/%{module}/*.py | |
104 | %{py3_sitedir}/%{module}/*.pyi | |
105 | %{py3_sitedir}/%{module}/py.typed | |
106 | %{py3_sitedir}/%{module}/__pycache__ | |
107 | %dir %{py3_sitedir}/%{module}/array_api | |
108 | %{py3_sitedir}/%{module}/array_api/*.py | |
109 | %{py3_sitedir}/%{module}/array_api/__pycache__ | |
110 | %dir %{py3_sitedir}/%{module}/compat | |
111 | %{py3_sitedir}/%{module}/compat/*.py | |
112 | %{py3_sitedir}/%{module}/compat/__pycache__ | |
113 | %dir %{py3_sitedir}/%{module}/core | |
114 | %{py3_sitedir}/%{module}/core/*.py | |
115 | %{py3_sitedir}/%{module}/core/*.pyi | |
116 | %{py3_sitedir}/%{module}/core/__pycache__ | |
117 | %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so | |
118 | %dir %{py3_sitedir}/%{module}/distutils | |
119 | %{py3_sitedir}/%{module}/distutils/*.py | |
120 | %{py3_sitedir}/%{module}/distutils/*.pyi | |
121 | %{py3_sitedir}/%{module}/distutils/__pycache__ | |
122 | %dir %{py3_sitedir}/%{module}/distutils/command | |
123 | %{py3_sitedir}/%{module}/distutils/command/*.py | |
124 | %{py3_sitedir}/%{module}/distutils/command/__pycache__ | |
125 | %dir %{py3_sitedir}/%{module}/distutils/fcompiler | |
126 | %{py3_sitedir}/%{module}/distutils/fcompiler/*.py | |
127 | %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ | |
128 | %dir %{py3_sitedir}/%{module}/fft | |
129 | %{py3_sitedir}/%{module}/fft/*.py | |
130 | %{py3_sitedir}/%{module}/fft/*.pyi | |
131 | %{py3_sitedir}/%{module}/fft/__pycache__ | |
132 | %attr(755,root,root) %{py3_sitedir}/%{module}/fft/_pocketfft_internal.cpython-3*.so | |
133 | %dir %{py3_sitedir}/%{module}/lib | |
134 | %{py3_sitedir}/%{module}/lib/*.py | |
135 | %{py3_sitedir}/%{module}/lib/*.pyi | |
136 | %{py3_sitedir}/%{module}/lib/__pycache__ | |
137 | %dir %{py3_sitedir}/%{module}/linalg | |
138 | %{py3_sitedir}/%{module}/linalg/*.py | |
139 | %{py3_sitedir}/%{module}/linalg/*.pyi | |
140 | %{py3_sitedir}/%{module}/linalg/__pycache__ | |
141 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so | |
142 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so | |
143 | %dir %{py3_sitedir}/%{module}/ma | |
144 | %{py3_sitedir}/%{module}/ma/*.py | |
145 | %{py3_sitedir}/%{module}/ma/*.pyi | |
146 | %{py3_sitedir}/%{module}/ma/__pycache__ | |
147 | %dir %{py3_sitedir}/%{module}/matrixlib | |
148 | %{py3_sitedir}/%{module}/matrixlib/*.py | |
149 | %{py3_sitedir}/%{module}/matrixlib/*.pyi | |
150 | %{py3_sitedir}/%{module}/matrixlib/__pycache__ | |
151 | %dir %{py3_sitedir}/%{module}/polynomial | |
152 | %{py3_sitedir}/%{module}/polynomial/*.py | |
153 | %{py3_sitedir}/%{module}/polynomial/*.pyi | |
154 | %{py3_sitedir}/%{module}/polynomial/__pycache__ | |
155 | %dir %{py3_sitedir}/%{module}/random | |
156 | %{py3_sitedir}/%{module}/random/*.py | |
157 | %{py3_sitedir}/%{module}/random/*.pyi | |
158 | %{py3_sitedir}/%{module}/random/__pycache__ | |
159 | %attr(755,root,root) %{py3_sitedir}/%{module}/random/*.cpython-3*.so | |
160 | %dir %{py3_sitedir}/%{module}/testing | |
161 | %{py3_sitedir}/%{module}/testing/_private | |
162 | %{py3_sitedir}/%{module}/testing/*.py | |
163 | %{py3_sitedir}/%{module}/testing/*.pyi | |
164 | %{py3_sitedir}/%{module}/testing/__pycache__ | |
165 | %dir %{py3_sitedir}/%{module}/typing | |
166 | %{py3_sitedir}/%{module}/typing/*.py | |
167 | %{py3_sitedir}/%{module}/typing/*.pyi | |
168 | %{py3_sitedir}/%{module}/typing/__pycache__ | |
169 | %{py3_sitedir}/numpy-%{version}-py*.egg-info | |
170 | ||
171 | %files devel | |
172 | %defattr(644,root,root,755) | |
173 | %{py3_sitedir}/%{module}/*.pxd | |
174 | %{py3_sitedir}/%{module}/core/include | |
175 | %{py3_sitedir}/%{module}/core/lib | |
176 | %{py3_sitedir}/%{module}/random/*.pxd | |
177 | %{py3_sitedir}/%{module}/random/lib | |
178 | ||
179 | %files -n f2py3 | |
180 | %defattr(644,root,root,755) | |
181 | %attr(755,root,root) %{_bindir}/f2py | |
182 | %attr(755,root,root) %{_bindir}/f2py3 | |
183 | %attr(755,root,root) %{_bindir}/f2py%{py3_ver} | |
184 | %dir %{py3_sitedir}/%{module}/f2py | |
185 | %{py3_sitedir}/%{module}/f2py/*.py | |
186 | %{py3_sitedir}/%{module}/f2py/*.pyi | |
187 | %{py3_sitedir}/%{module}/f2py/__pycache__ | |
188 | %{py3_sitedir}/%{module}/f2py/src |