]>
Commit | Line | Data |
---|---|---|
7e0e5ecb JB |
1 | # TODO: failing tests with 32-bit ABIs: |
2 | # - i686: | |
3 | # FAILED numpy/core/tests/test_mem_policy.py::test_new_policy - AssertionError:... | |
4 | # FAILED numpy/core/tests/test_ufunc.py::TestUfunc::test_identityless_reduction_huge_array | |
5 | # FAILED numpy/core/tests/test_umath.py::TestRemainder::test_float_remainder_overflow | |
6 | # FAILED numpy/random/tests/test_generator_mt19937.py::TestRandomDist::test_pareto | |
7 | # - x32: | |
8 | # Fatal Python error: Segmentation fault | |
9 | # File ".../BUILD/numpy-1.22.2/build/testenv/libx32/python3.10/site-packages/numpy/random/tests/test_direct.py", line 250 in test_pickle | |
3a26a2ba JB |
10 | # |
11 | # Conditional build: | |
12 | %bcond_without tests # unit tests | |
13 | ||
c7bc85b9 JB |
14 | %define module numpy |
15 | Summary: Python 3.x numerical facilities | |
16 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 3.x | |
17 | Name: python3-%{module} | |
8e7c965d JB |
18 | Version: 1.22.4 |
19 | Release: 1 | |
c7bc85b9 JB |
20 | Epoch: 1 |
21 | License: BSD | |
22 | Group: Libraries/Python | |
23 | #Source0Download: https://github.com/numpy/numpy/releases/ | |
24 | Source0: https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz | |
8e7c965d | 25 | # Source0-md5: 09b3a41ea0b9bc20bd1691cf88f0b0d3 |
fda4872c | 26 | Patch0: %{name}-deprecated.patch |
982d6a3c | 27 | URL: https://github.com/numpy/numpy |
22d6751b JB |
28 | %if "%(test -w /dev/shm ; echo $?)" != "0" |
29 | BuildRequires: WRITABLE(/dev/shm) | |
30 | %endif | |
c7bc85b9 JB |
31 | BuildRequires: gcc-fortran |
32 | BuildRequires: lapack-devel >= 3.1.1-2 | |
8e7c965d JB |
33 | BuildRequires: python3-Cython >= 0.29.30 |
34 | BuildRequires: python3-devel >= 1:3.8 | |
35 | BuildRequires: python3-setuptools >= 1:59.2.0 | |
3a26a2ba | 36 | %if %{with tests} |
8e7c965d JB |
37 | %if "%{ver_lt '%{py3_ver}' '3.10'}" == "1" |
38 | BuildRequires: python3-cffi | |
39 | %endif | |
40 | BuildRequires: python3-hypothesis >= 6.24.1 | |
41 | #BuildRequires: python3-mypy >= 0.940 | |
42 | BuildRequires: python3-pytest >= 6.2.5 | |
43 | BuildRequires: python3-pytz >= 2021.3 | |
3a26a2ba | 44 | %endif |
c7bc85b9 JB |
45 | BuildRequires: rpm-pythonprov |
46 | BuildRequires: rpmbuild(macros) >= 1.714 | |
8e7c965d | 47 | Requires: python3-libs >= 1:3.8 |
c7bc85b9 JB |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
51 | NumPy is a collection of extension modules to provide high-performance | |
52 | multidimensional numeric arrays to the Python programming language. | |
53 | ||
54 | This package contains Python 3 modules. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia | |
58 | numeryczne na macierzach wielowymiarowych w języku Python. | |
59 | ||
60 | Ten pakiet zawiera moduły Pythona 3. | |
61 | ||
62 | %package devel | |
63 | Summary: C header files for Python 3 numerical modules | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 3 | |
65 | Group: Development/Languages/Python | |
98e4d49d | 66 | %pyrequires_eq python3-devel |
c7bc85b9 JB |
67 | Requires: %{name} = %{epoch}:%{version}-%{release} |
68 | ||
69 | %description devel | |
70 | C header files for Python 3 numerical modules. | |
71 | ||
72 | %description devel -l pl.UTF-8 | |
73 | Pliki nagłówkowe języka C modułów numerycznych Pythona 3. | |
74 | ||
75 | %package -n f2py3 | |
76 | Summary: Fortran to Python 3 interface generator | |
77 | Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3 | |
78 | Group: Libraries/Python | |
79 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
80 | ||
81 | %description -n f2py3 | |
82 | Fortran to Python 3 interface generator. | |
83 | ||
84 | %description -n f2py3 -l pl.UTF-8 | |
85 | Generator interfejsów z Fortranu do Pythona 3. | |
86 | ||
87 | %prep | |
88 | %setup -q -n %{module}-%{version} | |
fda4872c | 89 | %patch0 -p1 |
c7bc85b9 JB |
90 | |
91 | %build | |
92 | # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements, | |
93 | # instead of appending proper options (like -fPIC/-shared resp.) | |
94 | CFLAGS="%{rpmcflags} -fPIC" | |
95 | LDFLAGS="%{rpmldflags} -shared" | |
96 | ||
97 | %py3_build | |
98 | ||
3a26a2ba | 99 | %if %{with tests} |
b87c3f92 | 100 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
3a26a2ba JB |
101 | %{__python3} runtests.py --mode=full |
102 | %endif | |
103 | ||
c7bc85b9 JB |
104 | %install |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
107 | %py3_install | |
108 | ||
109 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc | |
110 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/random/_examples | |
111 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/tests | |
112 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests | |
113 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/LICENSE.txt | |
114 | ||
115 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c | |
116 | ||
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc LICENSE.txt THANKS.txt | |
123 | %dir %{py3_sitedir}/%{module} | |
124 | %{py3_sitedir}/%{module}/*.py | |
982d6a3c JR |
125 | %{py3_sitedir}/%{module}/*.pyi |
126 | %{py3_sitedir}/%{module}/py.typed | |
c7bc85b9 | 127 | %{py3_sitedir}/%{module}/__pycache__ |
98e4d49d MK |
128 | %dir %{py3_sitedir}/%{module}/array_api |
129 | %{py3_sitedir}/%{module}/array_api/*.py | |
130 | %{py3_sitedir}/%{module}/array_api/__pycache__ | |
c7bc85b9 JB |
131 | %dir %{py3_sitedir}/%{module}/compat |
132 | %{py3_sitedir}/%{module}/compat/*.py | |
133 | %{py3_sitedir}/%{module}/compat/__pycache__ | |
134 | %dir %{py3_sitedir}/%{module}/core | |
135 | %{py3_sitedir}/%{module}/core/*.py | |
982d6a3c | 136 | %{py3_sitedir}/%{module}/core/*.pyi |
c7bc85b9 JB |
137 | %{py3_sitedir}/%{module}/core/__pycache__ |
138 | %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so | |
139 | %dir %{py3_sitedir}/%{module}/distutils | |
140 | %{py3_sitedir}/%{module}/distutils/*.py | |
982d6a3c | 141 | %{py3_sitedir}/%{module}/distutils/*.pyi |
c7bc85b9 | 142 | %{py3_sitedir}/%{module}/distutils/__pycache__ |
56ec9c09 | 143 | %{py3_sitedir}/%{module}/distutils/checks |
c7bc85b9 JB |
144 | %dir %{py3_sitedir}/%{module}/distutils/command |
145 | %{py3_sitedir}/%{module}/distutils/command/*.py | |
146 | %{py3_sitedir}/%{module}/distutils/command/__pycache__ | |
147 | %dir %{py3_sitedir}/%{module}/distutils/fcompiler | |
148 | %{py3_sitedir}/%{module}/distutils/fcompiler/*.py | |
149 | %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ | |
150 | %dir %{py3_sitedir}/%{module}/fft | |
151 | %{py3_sitedir}/%{module}/fft/*.py | |
982d6a3c | 152 | %{py3_sitedir}/%{module}/fft/*.pyi |
c7bc85b9 JB |
153 | %{py3_sitedir}/%{module}/fft/__pycache__ |
154 | %attr(755,root,root) %{py3_sitedir}/%{module}/fft/_pocketfft_internal.cpython-3*.so | |
155 | %dir %{py3_sitedir}/%{module}/lib | |
156 | %{py3_sitedir}/%{module}/lib/*.py | |
982d6a3c | 157 | %{py3_sitedir}/%{module}/lib/*.pyi |
c7bc85b9 JB |
158 | %{py3_sitedir}/%{module}/lib/__pycache__ |
159 | %dir %{py3_sitedir}/%{module}/linalg | |
160 | %{py3_sitedir}/%{module}/linalg/*.py | |
982d6a3c | 161 | %{py3_sitedir}/%{module}/linalg/*.pyi |
c7bc85b9 JB |
162 | %{py3_sitedir}/%{module}/linalg/__pycache__ |
163 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so | |
164 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so | |
165 | %dir %{py3_sitedir}/%{module}/ma | |
166 | %{py3_sitedir}/%{module}/ma/*.py | |
982d6a3c | 167 | %{py3_sitedir}/%{module}/ma/*.pyi |
c7bc85b9 JB |
168 | %{py3_sitedir}/%{module}/ma/__pycache__ |
169 | %dir %{py3_sitedir}/%{module}/matrixlib | |
170 | %{py3_sitedir}/%{module}/matrixlib/*.py | |
982d6a3c | 171 | %{py3_sitedir}/%{module}/matrixlib/*.pyi |
c7bc85b9 JB |
172 | %{py3_sitedir}/%{module}/matrixlib/__pycache__ |
173 | %dir %{py3_sitedir}/%{module}/polynomial | |
174 | %{py3_sitedir}/%{module}/polynomial/*.py | |
982d6a3c | 175 | %{py3_sitedir}/%{module}/polynomial/*.pyi |
c7bc85b9 JB |
176 | %{py3_sitedir}/%{module}/polynomial/__pycache__ |
177 | %dir %{py3_sitedir}/%{module}/random | |
178 | %{py3_sitedir}/%{module}/random/*.py | |
982d6a3c | 179 | %{py3_sitedir}/%{module}/random/*.pyi |
c7bc85b9 JB |
180 | %{py3_sitedir}/%{module}/random/__pycache__ |
181 | %attr(755,root,root) %{py3_sitedir}/%{module}/random/*.cpython-3*.so | |
182 | %dir %{py3_sitedir}/%{module}/testing | |
183 | %{py3_sitedir}/%{module}/testing/_private | |
184 | %{py3_sitedir}/%{module}/testing/*.py | |
982d6a3c | 185 | %{py3_sitedir}/%{module}/testing/*.pyi |
c7bc85b9 | 186 | %{py3_sitedir}/%{module}/testing/__pycache__ |
982d6a3c JR |
187 | %dir %{py3_sitedir}/%{module}/typing |
188 | %{py3_sitedir}/%{module}/typing/*.py | |
189 | %{py3_sitedir}/%{module}/typing/*.pyi | |
190 | %{py3_sitedir}/%{module}/typing/__pycache__ | |
c7bc85b9 JB |
191 | %{py3_sitedir}/numpy-%{version}-py*.egg-info |
192 | ||
193 | %files devel | |
194 | %defattr(644,root,root,755) | |
930e1f7b | 195 | %{py3_sitedir}/%{module}/*.pxd |
c7bc85b9 JB |
196 | %{py3_sitedir}/%{module}/core/include |
197 | %{py3_sitedir}/%{module}/core/lib | |
198 | %{py3_sitedir}/%{module}/random/*.pxd | |
930e1f7b | 199 | %{py3_sitedir}/%{module}/random/lib |
c7bc85b9 JB |
200 | |
201 | %files -n f2py3 | |
202 | %defattr(644,root,root,755) | |
982d6a3c | 203 | %attr(755,root,root) %{_bindir}/f2py |
c7bc85b9 JB |
204 | %attr(755,root,root) %{_bindir}/f2py3 |
205 | %attr(755,root,root) %{_bindir}/f2py%{py3_ver} | |
206 | %dir %{py3_sitedir}/%{module}/f2py | |
207 | %{py3_sitedir}/%{module}/f2py/*.py | |
982d6a3c | 208 | %{py3_sitedir}/%{module}/f2py/*.pyi |
c7bc85b9 JB |
209 | %{py3_sitedir}/%{module}/f2py/__pycache__ |
210 | %{py3_sitedir}/%{module}/f2py/src |